Skip to content

Commit

Permalink
Update release signing configuration (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
nywilken authored Mar 1, 2022
1 parent f5db6d6 commit 4619c7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}
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 }}
17 changes: 5 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4619c7f

Please sign in to comment.