Skip to content

Commit bb7cb34

Browse files
committed
feat: goreleaser native sboms
1 parent 2621752 commit bb7cb34

3 files changed

Lines changed: 8 additions & 18 deletions

File tree

.github/workflows/release.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ jobs:
4545
registry: ghcr.io
4646
username: ${{ github.repository_owner }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
48-
- name: Export SBOM for binary in SPDX JSON format
49-
# https://docs.github.com/en/rest/dependency-graph/sboms?apiVersion=2022-11-28
50-
run: |
51-
gh api \
52-
-H "Accept: application/vnd.github+json" \
53-
-H "X-GitHub-Api-Version: 2022-11-28" \
54-
/repos/${{ github.repository }}/dependency-graph/sbom > sbom.spdx.json
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5748
- uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
5849
id: goreleaser
5950
with:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/dist
22
/cover.out
3-
/sbom.spdx.json

.goreleaser.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ builds:
2424
binary: another-binary
2525
main: ./cmd/another-binary
2626

27+
checksum:
28+
name_template: checksums.txt
29+
30+
sboms:
31+
- ids:
32+
- go-cli-github
33+
- another-binary
34+
2735
changelog:
2836
use: github-native
2937

@@ -48,11 +56,3 @@ dockers_v2:
4856
- latest
4957
build_args:
5058
BINARY: another-binary
51-
52-
release:
53-
extra_files:
54-
- glob: ./sbom.spdx.json
55-
name_template: "{{ .ProjectName }}.v{{ .Version }}.sbom.spdx.json"
56-
57-
checksum:
58-
name_template: checksums.txt

0 commit comments

Comments
 (0)