Upload attestation bundle as a release artifact (#3563)
The bundle generated by actions/attest is currently only retrievable via the GitHub attestations API, which requires authentication. Uploading it as jq-attestation.json lets downstream consumers (distro packagers, unauthenticated CI) verify provenance offline.
This commit is contained in:
1 parent
46d1da3094
commit
a5a29cccc5
1 file changed
+11
-7
@@ -386,21 +386,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
pattern: jq-*
|
pattern: jq-*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
- name: Prepare release artifacts
|
||||||
|
run: |
|
||||||
|
cp jq-linux-amd64 jq-linux64
|
||||||
|
cp jq-macos-amd64 jq-osx-amd64
|
||||||
|
cp jq-windows-amd64.exe jq-win64.exe
|
||||||
|
- name: Generate signed attestations
|
||||||
|
id: attest
|
||||||
|
uses: actions/attest@v4
|
||||||
|
with:
|
||||||
|
subject-path: jq-*
|
||||||
- name: Upload release
|
- name: Upload release
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ github.ref_name }}
|
TAG_NAME: ${{ github.ref_name }}
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
cp jq-linux-amd64 jq-linux64
|
mv "${{ steps.attest.outputs.bundle-path }}" jq-attestation.json
|
||||||
cp jq-macos-amd64 jq-osx-amd64
|
|
||||||
cp jq-windows-amd64.exe jq-win64.exe
|
|
||||||
sha256sum jq-* > sha256sum.txt
|
sha256sum jq-* > sha256sum.txt
|
||||||
gh release create "$TAG_NAME" --draft --title "jq ${TAG_NAME#jq-}" --generate-notes
|
gh release create "$TAG_NAME" --draft --title "jq ${TAG_NAME#jq-}" --generate-notes
|
||||||
gh release upload "$TAG_NAME" --clobber jq-* sha256sum.txt
|
gh release upload "$TAG_NAME" --clobber jq-* sha256sum.txt
|
||||||
- name: Generate signed attestations
|
|
||||||
uses: actions/attest@v4
|
|
||||||
with:
|
|
||||||
subject-path: jq-*
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
uses: crazy-max/ghaction-import-gpg@v7
|
uses: crazy-max/ghaction-import-gpg@v7
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in new issue
Block a user