Skip to content

Commit 2a18d4e

Browse files
committed
ci: Create the publish action
1 parent ebadc92 commit 2a18d4e

2 files changed

Lines changed: 47 additions & 35 deletions

File tree

.github/workflows/test_and_publish.yml

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -156,37 +156,49 @@ jobs:
156156
run: |
157157
poetry run bandit --ini=setup.cfg -ll 2> /dev/null
158158
159-
# publish:
160-
# needs: [ autoflake, black, isort, pycodestyle, pydocstyle, mypy, bandit ]
161-
# if: github.event_name == 'release' && github.event.action == 'published'
162-
# runs-on: ubuntu-latest
163-
# continue-on-error: true
164-
# environment:
165-
# name: pypi
166-
# url: https://pypi.org/p/kasm
167-
# permissions:
168-
# id-token: write
169-
#
170-
# steps:
171-
# - uses: actions/checkout@master
172-
#
173-
# - name: Set up Python 3.13
174-
# uses: actions/setup-python@v4
175-
# with:
176-
# python-version: '3.14'
177-
#
178-
# - name: Install Poetry
179-
# run: |
180-
# curl -sSL https://install.python-poetry.org | python3 -
181-
# echo "$HOME/.local/bin" >> $GITHUB_PATH
182-
#
183-
# - name: Build the package
184-
# run: poetry build
185-
#
186-
# - name: Verify metadata
187-
# run: |
188-
# python -m pip install twine
189-
# python -m twine check dist/*
190-
#
191-
# - name: Publish distribution to PyPI
192-
# uses: pypa/gh-action-pypi-publish@release/v1
159+
publish:
160+
needs: [ autoflake, black, isort, pycodestyle, pydocstyle, mypy, bandit ]
161+
162+
if: github.event_name == 'release' && github.event.action == 'published'
163+
164+
165+
runs-on: ubuntu-latest
166+
167+
continue-on-error: true
168+
169+
environment:
170+
name: pypi
171+
url: https://pypi.org/p/kasm
172+
173+
permissions:
174+
id-token: write
175+
contents: read
176+
177+
steps:
178+
- name: Check out source
179+
uses: actions/checkout@v6
180+
with:
181+
persist-credentials: false
182+
183+
- name: Set up Python
184+
uses: actions/setup-python@v6
185+
with:
186+
python-version: "3.14"
187+
cache: "poetry"
188+
189+
- name: Install Poetry
190+
uses: snok/install-poetry@v1
191+
192+
- name: Install build dependencies
193+
run: poetry install --only main
194+
195+
- name: Build distributions
196+
run: poetry build
197+
198+
- name: Check distributions
199+
run: |
200+
python -m pip install --upgrade pip twine
201+
python -m twine check --strict dist/*
202+
203+
- name: Publish to PyPI
204+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "kasm"
7-
version = "0.1.0"
7+
version = "1.18.1.0"
88
description = "Python client for the Kasm API."
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)