8282 if-no-files-found : error
8383
8484 publish :
85- if : github.ref_type == 'tag' || ( github.ref_type == 'branch' || github.ref_name == 'release-test-pypi' )
85+ if : github.ref_type == 'tag'
8686 needs : [build]
87- uses : ./.github/workflows/_publish.yml
88- with :
89- is_test : ${{ github.ref_type == 'tag' }}
90- release-artifact-ids : ${{ needs.build.outputs.release-artifact-id }},${{ needs.build.outputs.wheel-artifact-id }}
87+ environment : release
88+ permissions :
89+ id-token : write # Used to authenticate to PyPI via OIDC
90+ contents : read
91+ runs-on : ubuntu-latest
92+
93+ steps :
94+ - name : Download artifacts
95+ uses : actions/download-artifact@v5
96+ with :
97+ merge-multiple : true # store both in the root, not in named directories
98+ artifact-ids : ${{ needs.build.outputs.release-artifact-id }},${{ needs.build.outputs.wheel-artifact-id }}
99+
100+ - name : debug
101+ run : find .
102+
103+ - name : Publish github source
104+ uses : softprops/action-gh-release@v2
105+ with :
106+ files : ' *.tar.*'
107+ fail_on_unmatched_files : true
108+ draft : true
109+
110+ - name : Publish to PyPi server
111+ uses : pypa/gh-action-pypi-publish@release/v1.13
112+
113+ test-publish :
114+ # use the full form to ensure insane tags and errors in 'on' filter still don't kick.
115+ if : github.ref == 'refs/heads/release-test-pypi'
116+ needs : [build]
117+ environment : test-release
118+ permissions :
119+ id-token : write # Used to authenticate to PyPI via OIDC
120+ contents : read
121+ runs-on : ubuntu-latest
122+
123+ steps :
124+ - name : Download artifacts
125+ uses : actions/download-artifact@v5
126+ with :
127+ merge-multiple : true
128+ artifact-ids : ${{ needs.build.outputs.wheel-artifact-id }}
129+
130+ - name : debug
131+ run : find .
132+
133+ - name : Publish to Test PyPi server
134+ uses : pypa/gh-action-pypi-publish@release/v1.13
135+ with :
136+ repository-url : https://test.pypi.org/legacy
0 commit comments