File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 Build :
1616 name : " Build"
1717 runs-on : " ubuntu-latest"
18- environment :
19- name : " publish"
2018 outputs :
2119 hashes : ${{ steps.hash.outputs.hashes }}
22- pypi-token : ${{ steps.pypi-token.outputs.pypi-token }}
2320
2421 steps :
2522 - name : " Checkout repository"
5552 if-no-files-found : error
5653 retention-days : 5
5754
58- # We forward here rather than add the 'publish' job
59- # to the 'publish' GitHub Environment to avoid needing
60- # to approve the execution twice. Since this job is
61- # depended on by the 'publish' job we get the same
62- # security gating.
63- - name : " Forward 'PYPI_TOKEN' to publish job"
64- id : " pypi-token"
65- run : |
66- echo "pypi-token=${{ secrets.PYPI_TOKEN }}" >> $GITHUB_OUTPUT
67-
6855 Provenance :
6956 needs : ["Build"]
7057 uses : " slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0"
8370 if : startsWith(github.ref, 'refs/tags/')
8471 needs : ["Build", "Provenance"]
8572 runs-on : " ubuntu-latest"
73+ # This environment gives access to 'secrets.PYPI_TOKEN'
74+ # and must be approved by environment reviewers before running.
75+ environment :
76+ name : " publish"
77+
8678 permissions :
8779 # contents: write is only needed to upload the
8880 # dists to the GitHub release.
10799 uses : " pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc"
108100 with :
109101 user : __token__
110- password : " ${{ needs.Build.outputs.pypi-token }}"
102+ password : " ${{ secrets.PYPI_TOKEN }}"
You can’t perform that action at this time.
0 commit comments