Skip to content

Commit

Permalink
Sign shecksum file
Browse files Browse the repository at this point in the history
  • Loading branch information
nauxliu committed Aug 13, 2020
1 parent 23fdeb1 commit 9bd16e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Run GoReleaser
if: startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
6 changes: 5 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
algorithm: sha256
signs:
- artifacts: checksum
signature: "${artifact}.sig"
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]

0 comments on commit 9bd16e4

Please sign in to comment.