Skip to content

Commit

Permalink
Add signatures for keyless signing (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 authored Nov 14, 2022
1 parent 4fe6f02 commit 6e89369
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: v0.178.0
version: v1.12.3
args: check
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
tags:
- v*.*.*

permissions:
contents: write
id-token: write

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -19,10 +23,12 @@ jobs:
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Install Cosign
uses: sigstore/cosign-installer@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: v0.178.0
version: v1.12.3
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ changelog:
skip: true
checksum:
name_template: 'checksums.txt'
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
signature: '${artifact}.keyless.sig'
certificate: '${artifact}.pem'
output: true
artifacts: checksum
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
release:
github:
owner: terraform-linters
Expand Down

0 comments on commit 6e89369

Please sign in to comment.