File tree Expand file tree Collapse file tree 1 file changed +33
-4
lines changed Expand file tree Collapse file tree 1 file changed +33
-4
lines changed Original file line number Diff line number Diff line change 11---
2-
32name : Publish PyPI Package
43
54on :
6- release :
7- types : [created]
5+ push :
86 workflow_dispatch :
97
108jobs :
11- publish :
9+ build :
1210 runs-on : ubuntu-latest
1311 name : Publish PyPI Package
1412 steps :
@@ -31,10 +29,41 @@ jobs:
3129 - name : Install tox
3230 run : sudo apt install --yes tox
3331
32+ - name : Install pypa
33+ run : |
34+ pip install build
35+
36+ - name : Store the distribution packages
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : python-package-distributions
40+ path : dist/
41+
3442 - name : Publish PyPI Package
3543 env :
3644 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
3745 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
3846 run : |
3947 tox -e pypi
4048 .tox/pypi/bin/twine upload .tox/pypi/dist/*
49+
50+ publish-to-pypi :
51+ name : Publish Python 🐍 distribution 📦 to PyPI
52+ if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
53+ needs :
54+ - build
55+ runs-on : ubuntu-latest
56+ environment :
57+ name : pypi
58+ url : https://pypi.org/p/ebuildtester
59+ permissions :
60+ id-token : write # IMPORTANT: mandatory for trusted publishing
61+
62+ steps :
63+ - name : Download all the dists
64+ uses : actions/download-artifact@v4
65+ with :
66+ name : python-package-distributions
67+ path : dist/
68+ - name : Publish distribution 📦 to PyPI
69+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments