1515jobs :
1616 sdist :
1717 runs-on : ubuntu-latest
18- outputs :
19- hash : ${{ steps.hash.outputs.hash }}
2018 steps :
2119 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2220 with :
7068 with :
7169 name : build-wheels-${{ matrix.os }}
7270 path : ./wheelhouse
73- hash :
74- # Generate hashes for the sdist and wheels, used later for provenance.
75- needs : [sdist, wheels]
76- runs-on : ubuntu-latest
77- outputs :
78- hash : ${{ steps.hash.outputs.hash }}
79- steps :
80- - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
81- with :
82- path : dist
83- pattern : build-*
84- merge-multiple : true
85- - name : generate hash
86- id : hash
87- run : cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
88- provenance :
89- needs : [hash]
90- permissions :
91- actions : read
92- id-token : write
93- contents : write
94- # Can't pin with hash due to how this workflow works.
95- uses :
slsa-framework/slsa-github-generator/.github/workflows/[email protected] 96- with :
97- base64-subjects : ${{ needs.hash.outputs.hash }}
98- # When building more wheels, use the Python version as the provenance file name.
99- provenance-name : ${{ inputs.python && format('{0}.intoto.jsonl', inputs.python) || null }}
10071 create-release :
101- # Upload the sdist, wheels, and provenance to a GitHub release. They remain
102- # available as build artifacts for a while as well.
103- needs : [provenance]
72+ needs : [sdist, wheels]
10473 runs-on : ubuntu-latest
10574 permissions :
10675 contents : write
@@ -110,29 +79,24 @@ jobs:
11079 path : dist
11180 pattern : build-*
11281 merge-multiple : true
113- - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
114- with :
115- pattern : ' *.intoto.jsonl'
11682 # When building a new tag, create a new draft release.
11783 - if : github.event_name == 'push'
11884 name : create release
11985 run : >
12086 gh release create --draft --repo ${{ github.repository }}
121- ${{ inputs.tag || github.ref_name }}
122- *.intoto.jsonl/* dist/*
87+ ${{ inputs.tag || github.ref_name }} dist/*
12388 env :
12489 GH_TOKEN : ${{ github.token }}
12590 # When running manually, update the existing release with more files.
12691 - if : github.event_name == 'workflow_dispatch'
12792 name : update release
12893 run : >
12994 gh release upload --repo ${{ github.repository }}
130- ${{ inputs.tag || github.ref_name }}
131- *.intoto.jsonl/* dist/*
95+ ${{ inputs.tag || github.ref_name }} dist/*
13296 env :
13397 GH_TOKEN : ${{ github.token }}
13498 publish-pypi :
135- needs : [provenance ]
99+ needs : [sdist, wheels ]
136100 # Wait for approval before attempting to upload to PyPI. This allows reviewing the
137101 # files in the draft release.
138102 environment :
0 commit comments