Skip to content

Commit

Permalink
Merge pull request #6 from shibumi/shibumi/add-keyless-signatures
Browse files Browse the repository at this point in the history
feat: add keyless signatures
  • Loading branch information
shibumi authored Nov 13, 2021
2 parents 6d99b49 + b0be9f2 commit 63d199c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
Expand All @@ -37,11 +40,16 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: install cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.3.1'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: 'v0.180.2'
version: 'v0.184.0'
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_EXPERIMENTAL: 1
9 changes: 8 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ builds:
- linux
goarch:
- amd64
main: .
main: .
source:
enabled: true
signs:
- cmd: cosign
signature: "${artifact}.sig"
args: ["sign-blob", "--oids-issuer=https://token.actions.githubusercontent.com", "--output=${signature}", "${artifact}"]
artifacts: all

0 comments on commit 63d199c

Please sign in to comment.