-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (59 loc) · 1.76 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Github Release and PyPi Publish
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
jobs:
build:
name: Build distribution and publish 🐍 to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/kuksa-client
permissions:
id-token: write
contents: write
steps:
- name: Checkout kuksa-python-sdk
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies with pip
run: |
cd kuksa-client
pip install -r requirements.txt
pip install -e .
- name: Install pypa/build
run: pip install build --user
- name: Build for PyPI
run: |
cd kuksa-client
python3 -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: kuksa-client/dist
- name: Create draft release
id: create_release
uses: softprops/action-gh-release@v2
with:
draft: true
name: KUKSA Python SDK ${{ github.ref_name }}