File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8888 upload_pypi :
8989 needs : [build_wheels, build_sdist]
9090 runs-on : ubuntu-latest
91+
92+ environment :
93+ name : pypi
94+ url : https://pypi.org/p/<package-name> # Replace <package-name> with your PyPI project name
95+
96+
9197 environment : ${{ case(github.ref_type == 'tag', 'pypi', 'testpypi') }}
9298
9399 permissions :
@@ -109,3 +115,50 @@ jobs:
109115 # - name: Publish distribution to PyPI
110116 # # if: github.ref_type == 'tag'
111117 # uses: pypa/gh-action-pypi-publish@release/v1
118+
119+
120+ publish-to-testpypi :
121+ needs : [build_wheels, build_sdist]
122+ runs-on : ubuntu-latest
123+
124+ environment :
125+ name : testpypi
126+ url : https://test.pypi.org/p/crypt4gh
127+
128+ permissions :
129+ id-token : write
130+
131+ steps :
132+ - name : Get artifacts
133+ uses : actions/download-artifact@v8
134+ with :
135+ merge-multiple : true
136+ path : dist
137+
138+ - name : Publish distribution to Test PyPI
139+ # if: github.ref_type == 'branch'
140+ uses : pypa/gh-action-pypi-publish@release/v1
141+ with :
142+ repository-url : https://test.pypi.org/legacy/
143+
144+ publish-to-pypi :
145+ needs : [build_wheels, build_sdist]
146+ runs-on : ubuntu-latest
147+
148+ environment :
149+ name : pypi
150+ url : https://pypi.org/p/crypt4gh
151+
152+ permissions :
153+ id-token : write
154+
155+ steps :
156+ - name : Get artifacts
157+ uses : actions/download-artifact@v8
158+ with :
159+ merge-multiple : true
160+ path : dist
161+
162+ - name : Publish distribution to PyPI
163+ # if: github.ref_type == 'tag'
164+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments