File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Deploy to Pypi
1+ name : Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
22
3- on : workflow_dispatch
3+ on : push
44
55jobs :
66 build :
@@ -34,10 +34,43 @@ jobs:
3434 Publish Python 🐍 distribution 📦 to PyPI
3535 if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3636 needs :
37- - build
37+ - build
3838 runs-on : ubuntu-latest
3939 environment :
4040 name : pypi
4141 url : https://pypi.org/p/jsoniq
4242 permissions :
43- id-token : write
43+ id-token : write # IMPORTANT: mandatory for trusted publishing
44+
45+ steps :
46+ - name : Download all the dists
47+ uses : actions/download-artifact@v4
48+ with :
49+ name : python-package-distributions
50+ path : dist/
51+ - name : Publish distribution 📦 to PyPI
52+ uses : pypa/gh-action-pypi-publish@release/v1
53+
54+ publish-to-testpypi :
55+ name : Publish Python 🐍 distribution 📦 to TestPyPI
56+ needs :
57+ - build
58+ runs-on : ubuntu-latest
59+
60+ environment :
61+ name : testpypi
62+ url : https://test.pypi.org/p/jsoniq
63+
64+ permissions :
65+ id-token : write # IMPORTANT: mandatory for trusted publishing
66+
67+ steps :
68+ - name : Download all the dists
69+ uses : actions/download-artifact@v4
70+ with :
71+ name : python-package-distributions
72+ path : dist/
73+ - name : Publish distribution 📦 to TestPyPI
74+ uses : pypa/gh-action-pypi-publish@release/v1
75+ with :
76+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments