Skip to content
Myr

Upload attestation bundle as a release artifact (#3563)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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.

authored by itchyny · committed by GitHub · parent 46d1da3 · Browse files · 1 file+11 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−7 removed

  • other:+11 added−7 removed

1 file+11 added−7 removed

modified:.github/workflows/ci.yml+11 added-7 removed
384 unmodified lines
385 uses: actions/download-artifact@v8386 with:387 pattern: jq-*388 merge-multiple: true389 - name: Upload release390 env:391 TAG_NAME: ${{ github.ref_name }}392 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}389 - name: Prepare release artifacts390 run: |391 cp jq-linux-amd64 jq-linux64392 cp jq-macos-amd64 jq-osx-amd64393 cp jq-windows-amd64.exe jq-win64.exe397 sha256sum jq-* > sha256sum.txt398 gh release create "$TAG_NAME" --draft --title "jq ${TAG_NAME#jq-}" --generate-notes399 gh release upload "$TAG_NAME" --clobber jq-* sha256sum.txt394 - name: Generate signed attestations395 id: attest396 uses: actions/attest@v4397 with:398 subject-path: jq-*399 - name: Upload release400 env:401 TAG_NAME: ${{ github.ref_name }}402 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}403 run: |404 mv "${{ steps.attest.outputs.bundle-path }}" jq-attestation.json405 sha256sum jq-* > sha256sum.txt406 gh release create "$TAG_NAME" --draft --title "jq ${TAG_NAME#jq-}" --generate-notes407 gh release upload "$TAG_NAME" --clobber jq-* sha256sum.txt408 - name: Import GPG key409 uses: crazy-max/ghaction-import-gpg@v7410 with:411 gpg_private_key: ${{ secrets.JQ_RELEASE_GPG_PRIVATE_KEY }}
20 unmodified lines