File tree Expand file tree Collapse file tree 4 files changed +401
-13
lines changed
Expand file tree Collapse file tree 4 files changed +401
-13
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,14 @@ jobs:
3737 version-extraction-override : ' regex:version = "(.*)"'
3838
3939 release :
40- # TODO: enable once we want to release this package
41- if : false
42- # if: github.event_name == 'push' && github.ref_name == 'main' && needs.build.outputs.version-changed == 'true'
40+ name : Publish package
41+ if : github.event_name == 'push' && github.ref_name == 'main' && needs.build.outputs.version-changed == 'true'
4342 needs : [build]
4443 runs-on : ubuntu-latest
44+ permissions :
45+ id-token : write
46+ contents : write
47+ environment : pypi
4548 steps :
4649 - uses : actions/download-artifact@v3
4750 with :
5053 - name : Publish package on TestPyPi
5154 uses : pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8
5255 with :
53- user : __token__
54- password : ${{ secrets.TEST_PYPI_TOKEN }}
5556 repository-url : https://test.pypi.org/legacy/
5657 - name : Publish package on PyPi
5758 uses : pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8
58- with :
59- user : __token__
60- password : ${{ secrets.PYPI_TOKEN }}
6159 - uses : actions/checkout@v3
6260 - name : Push v${{ needs.build.outputs.new-version }} tag
6361 run : |
You can’t perform that action at this time.
0 commit comments