Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 1a4e57d

Browse files
committed
Refine PyPi release workflow 🚀
Enhanced the PyPi release workflow in the GitHub Actions. Added a dependency on the smoke test job, ensuring it passes before proceeding with the release. Also, included steps for code checkout, Python setup, and package building. Now using Python 3.11 and caching pip for faster runs.
1 parent 89ed9ae commit 1a4e57d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/pypi_release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,28 @@ jobs:
4545
pytest
4646
4747
pypi_release:
48+
needs: smoke_test
4849
runs-on: ubuntu-latest
4950
name: Publish to PyPi
5051
permissions:
5152
# Required for github actions to create a release
5253
contents: write
5354

5455
steps:
56+
- name: Checkout Code
57+
uses: actions/checkout@v3
58+
59+
- name: Setup Python
60+
uses: actions/setup-python@v4
61+
with:
62+
python-version: 3.11
63+
cache: pip
64+
65+
- name: Build the package
66+
run: |
67+
pip install wheel twine
68+
python setup.py sdist bdist_wheel
69+
5570
- name: Publish to PyPi
5671
env:
5772
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

0 commit comments

Comments
 (0)