@@ -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
0 commit comments