1- name : Publish to PyPI
1+ name : Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
22
3- on :
4- release :
5- types : [published]
3+ on : push
64
75jobs :
86 build :
1210 steps :
1311 - uses : actions/checkout@v4
1412 - name : Set up Python
15- uses : actions/setup-python@v4
13+ uses : actions/setup-python@v5
1614 with :
1715 python-version : " 3.x"
1816 - name : Install poetry
@@ -24,27 +22,26 @@ jobs:
2422 - name : Build package
2523 run : poetry build
2624 - name : Store the distribution packages
27- uses : actions/upload-artifact@v3
25+ uses : actions/upload-artifact@v4
2826 with :
2927 name : python-package-distributions
3028 path : dist/
3129
3230 publish-to-pypi :
33- name : >-
34- Publish Python 🐍 distribution 📦 to PyPI
35- if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
31+ name : Publish Python 🐍 distribution 📦 to PyPI
32+ if : startsWith(github.ref, 'refs/tags/')
3633 needs :
3734 - build
3835 runs-on : ubuntu-latest
3936 environment :
4037 name : pypi
41- url : https://pypi.org/p/structure-align
38+ url : https://pypi.org/p/structurealign
4239 permissions :
4340 id-token : write
4441
4542 steps :
4643 - name : Download all the dists
47- uses : actions/download-artifact@v3
44+ uses : actions/download-artifact@v4
4845 with :
4946 name : python-package-distributions
5047 path : dist/
8178 run : >-
8279 gh release upload
8380 '${{ github.ref_name }}' dist/**
84- --repo '${{ github.repository }}'
81+ --repo '${{ github.repository }}'
82+
83+ publish-to-testpypi :
84+ name : Publish Python 🐍 distribution 📦 to TestPyPI
85+ needs :
86+ - build
87+ runs-on : ubuntu-latest
88+ environment :
89+ name : testpypi
90+ url : https://test.pypi.org/p/structurealign
91+
92+ permissions :
93+ id-token : write
94+
95+ steps :
96+ - name : Download all the dists
97+ uses : actions/download-artifact@v4
98+ with :
99+ name : python-package-distributions
100+ path : dist/
101+ - name : Publish distribution 📦 to TestPyPI
102+ uses : pypa/gh-action-pypi-publish@release/v1
103+ with :
104+ repository-url : https://test.pypi.org/legacy/
0 commit comments