Skip to content

Commit c6d29f8

Browse files
authored
release: prefer actions/attest-build-provenance to cosign (#335)
* release: prefer actions/attest-build-provenance to cosign * attestations: write xref https://github.com/Shopify/ejson/blob/main/.github/workflows/release.yml
1 parent 0dd18b9 commit c6d29f8

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
contents: write
1414
packages: write
1515
id-token: write
16+
attestations: write
1617
steps:
1718
- name: Checkout
1819
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
@@ -25,8 +26,6 @@ jobs:
2526
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # tag=v5.3.0
2627
with:
2728
go-version: "${{ steps.gover.outputs.goversion }}"
28-
- name: Set up Cosign
29-
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # tag=v3.8.1
3029
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # tag=v3.3.0
3130
with:
3231
registry: ghcr.io
@@ -40,3 +39,13 @@ jobs:
4039
args: release --clean --parallelism=1
4140
env:
4241
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
- name: "Set up for signing"
43+
run: |
44+
mkdir -p to_sign
45+
mv dist/*.tar.gz to_sign/
46+
mv dist/*.deb to_sign/
47+
mv dist/*.apk to_sign/
48+
- name: "Sign artifacts"
49+
uses: actions/attest-build-provenance@bd77c077858b8d561b7a36cbe48ef4cc642ca39d # v2.2.2
50+
with:
51+
subject-path: "to_sign/*"

.goreleaser.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ builds:
99
goarch:
1010
- amd64
1111
- arm64
12-
hooks:
13-
post:
14-
- cmd: "cosign sign-blob --yes --output-certificate dist/{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}-keyless.pem --output-signature dist/{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}-keyless.sig {{ .Path }}"
1512

1613
release:
1714
extra_files:
@@ -63,15 +60,6 @@ docker_manifests:
6360
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-amd64
6461
- ghcr.io/shopify/{{ .ProjectName }}:{{ .Version }}-arm64
6562

66-
docker_signs:
67-
- cmd: cosign
68-
artifacts: manifests
69-
output: true
70-
args:
71-
- "sign"
72-
- "--yes"
73-
- "${artifact}"
74-
7563
nfpms:
7664
- id: goreleaser
7765
maintainer: "Shopify <admins@shopify.com>"

0 commit comments

Comments
 (0)