diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f59462e..1b99014 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,12 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.13.x + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v2 + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + PASSPHRASE: ${{ secrets.PASSPHRASE }} - uses: actions/cache@v1 with: path: ~/go/pkg/mod @@ -28,5 +34,6 @@ jobs: args: release --rm-dist key: ${{ secrets.YOUR_PRIVATE_KEY }} env: + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 8bb029c..f93ac05 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -15,6 +15,12 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.13.x + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v2 + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + PASSPHRASE: ${{ secrets.PASSPHRASE }} - uses: actions/cache@v1 with: path: ~/go/pkg/mod @@ -28,4 +34,5 @@ jobs: args: release --snapshot --rm-dist key: ${{ secrets.YOUR_PRIVATE_KEY }} env: + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 0e25d36..346a615 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,6 +15,16 @@ builds: goarm: - 7 checksum: - name_template: 'checksums.txt' + name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS' + algorithm: sha256 +signs: + - artifacts: checksum + args: + - "--local-user" + - "A29F60D591A974E20B5E90695C886ACC44EB17C0" + - "--output" + - "${signature}" + - "--detach-sign" + - "${artifact}" snapshot: name_template: "{{ .Tag }}-next"