Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbosch committed Nov 26, 2024
1 parent 7dca29e commit 8734adc
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 9 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}
6 changes: 3 additions & 3 deletions kuksa-client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ cmd2==1.5.0
# via kuksa_client (setup.cfg)
colorama==0.4.6
# via cmd2
grpcio==1.67.1
grpcio==1.68.0
# via grpcio-tools
grpcio-tools==1.67.1
grpcio-tools==1.68.0
# via kuksa_client (setup.cfg)
jsonpath-ng==1.7.0
# via kuksa_client (setup.cfg)
Expand All @@ -26,7 +26,7 @@ pyperclip==1.9.0
# via cmd2
wcwidth==0.2.13
# via cmd2
websockets==13.1
websockets==14.1
# via kuksa_client (setup.cfg)

# The following packages are considered to be unsafe in a requirements file:
Expand Down
12 changes: 6 additions & 6 deletions kuksa-client/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ cmd2==1.5.0
# via kuksa_client (setup.cfg)
colorama==0.4.6
# via cmd2
coverage[toml]==7.6.4
coverage[toml]==7.6.7
# via pytest-cov
dill==0.3.9
# via pylint
exceptiongroup==1.2.2
# via pytest
grpcio==1.67.1
grpcio==1.68.0
# via grpcio-tools
grpcio-tools==1.67.1
grpcio-tools==1.68.0
# via kuksa_client (setup.cfg)
iniconfig==2.0.0
# via pytest
Expand All @@ -30,7 +30,7 @@ jsonpath-ng==1.7.0
# via kuksa_client (setup.cfg)
mccabe==0.7.0
# via pylint
packaging==24.1
packaging==24.2
# via pytest
platformdirs==4.3.6
# via pylint
Expand Down Expand Up @@ -61,7 +61,7 @@ pytest-mock==3.14.0
# via kuksa_client (setup.cfg)
pytest-timeout==2.3.1
# via kuksa_client (setup.cfg)
tomli==2.0.2
tomli==2.1.0
# via
# coverage
# pylint
Expand All @@ -72,7 +72,7 @@ typing-extensions==4.12.2
# via astroid
wcwidth==0.2.13
# via cmd2
websockets==13.1
websockets==14.1
# via kuksa_client (setup.cfg)

# The following packages are considered to be unsafe in a requirements file:
Expand Down

0 comments on commit 8734adc

Please sign in to comment.