15
15
jobs :
16
16
sdist :
17
17
runs-on : ubuntu-latest
18
- outputs :
19
- hash : ${{ steps.hash.outputs.hash }}
20
18
steps :
21
19
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22
20
with :
70
68
with :
71
69
name : build-wheels-${{ matrix.os }}
72
70
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 }}
100
71
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]
104
73
runs-on : ubuntu-latest
105
74
permissions :
106
75
contents : write
@@ -110,29 +79,24 @@ jobs:
110
79
path : dist
111
80
pattern : build-*
112
81
merge-multiple : true
113
- - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
114
- with :
115
- pattern : ' *.intoto.jsonl'
116
82
# When building a new tag, create a new draft release.
117
83
- if : github.event_name == 'push'
118
84
name : create release
119
85
run : >
120
86
gh release create --draft --repo ${{ github.repository }}
121
- ${{ inputs.tag || github.ref_name }}
122
- *.intoto.jsonl/* dist/*
87
+ ${{ inputs.tag || github.ref_name }} dist/*
123
88
env :
124
89
GH_TOKEN : ${{ github.token }}
125
90
# When running manually, update the existing release with more files.
126
91
- if : github.event_name == 'workflow_dispatch'
127
92
name : update release
128
93
run : >
129
94
gh release upload --repo ${{ github.repository }}
130
- ${{ inputs.tag || github.ref_name }}
131
- *.intoto.jsonl/* dist/*
95
+ ${{ inputs.tag || github.ref_name }} dist/*
132
96
env :
133
97
GH_TOKEN : ${{ github.token }}
134
98
publish-pypi :
135
- needs : [provenance ]
99
+ needs : [sdist, wheels ]
136
100
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
137
101
# files in the draft release.
138
102
environment :
0 commit comments