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+ with :
113+ packages-dir : .
114+
115+ test-publish :
116+ # use the full form to ensure insane tags and errors in 'on' filter still don't kick.
117+ if : github.ref == 'refs/heads/release-test-pypi'
118+ needs : [build]
119+ environment : test-release
120+ permissions :
121+ id-token : write # Used to authenticate to PyPI via OIDC
122+ contents : read
123+ runs-on : ubuntu-latest
124+
125+ steps :
126+ - name : Download artifacts
127+ uses : actions/download-artifact@v5
128+ with :
129+ merge-multiple : true
130+ artifact-ids : ${{ needs.build.outputs.wheel-artifact-id }}
131+
132+ - name : debug
133+ run : find .
134+
135+ - name : Publish to Test PyPi server
136+ uses : pypa/gh-action-pypi-publish@release/v1.13
137+ with :
138+ packages-dir : .
139+ repository-url : https://test.pypi.org/legacy/
0 commit comments