Skip to content

Commit f12cbee

Browse files
authored
Generate build provenance for CLI releases (#430)
* Generate build provenance for CLI releases * Remove quotes from `subject-path`
1 parent dc3fe91 commit f12cbee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99
name: Release Go Binary
1010
runs-on: ubuntu-latest
1111
permissions:
12+
attestations: write
1213
contents: write
14+
id-token: write
1315
packages: write
1416
strategy:
1517
matrix:
@@ -24,6 +26,7 @@ jobs:
2426
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2527

2628
- uses: wangyoucao577/go-release-action@481a2c1a0f1be199722e3e9b74d7199acafc30a8 # v1.53
29+
id: go_release
2730
with:
2831
goversion: go.mod
2932
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -33,3 +36,10 @@ jobs:
3336
project_path: cmd/dependabot
3437
ldflags: >-
3538
-X github.com/dependabot/cli/cmd/dependabot/internal/cmd.version=${{ github.event.release.tag_name }}
39+
40+
- uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.3.3
41+
with:
42+
subject-path: |
43+
${{ steps.go_release.outputs.release_asset_dir }}/*
44+
dependabot-${{ github.ref_name}}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
45+
dependabot-${{ github.ref_name}}-${{ matrix.goos }}-${{ matrix.goarch }}.zip

0 commit comments

Comments
 (0)