From 4619c7fd80eb84f07ac5a38d1ec512a90e2e6a1f Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 1 Mar 2022 06:50:11 -0500 Subject: [PATCH] Update release signing configuration (#70) --- .github/workflows/release.yml | 17 ++++++++--------- .goreleaser.yml | 17 +++++------------ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdfff5f2..0bc8bead 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,22 +25,21 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Describe plugin id: plugin_describe run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')" - - name: Import GPG key - id: import_gpg - uses: hashicorp/ghaction-import-gpg@v2.1.0 - env: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + - name: Install signore + uses: hashicorp/setup-signore-package@v1 + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: version: latest args: release --rm-dist env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - API_VERSION: ${{ steps.plugin_describe.outputs.api_version }} \ No newline at end of file + API_VERSION: ${{ steps.plugin_describe.outputs.api_version }} + SIGNORE_CLIENT_ID: ${{ secrets.SIGNORE_CLIENT_ID }} + SIGNORE_CLIENT_SECRET: ${{ secrets.SIGNORE_CLIENT_SECRET }} + SIGNORE_SIGNER: ${{ secrets.SIGNORE_SIGNER }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 879e855b..12d06630 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,4 +1,4 @@ -# This is an example goreleaser.yaml file with some sane defaults. +# This is an example goreleaser.yaml file with some defaults. # Make sure to check the documentation at http://goreleaser.com env: - CGO_ENABLED=0 @@ -57,17 +57,10 @@ checksum: name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS' algorithm: sha256 signs: - - artifacts: checksum - args: - # if you are using this is in a GitHub action or some other automated pipeline, you - # need to pass the batch flag to indicate its not interactive. - - "--batch" - - "--local-user" - - "{{ .Env.GPG_FINGERPRINT }}" - - "--output" - - "${signature}" - - "--detach-sign" - - "${artifact}" + - cmd: signore + args: ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"] + artifacts: checksum + signature: ${artifact}.sig release: # If you want to manually examine the release before its live, uncomment this line: # draft: true