Skip to content

Commit e3db7d3

Browse files
authored
Sign releases using signore
1 parent c187c87 commit e3db7d3

2 files changed

Lines changed: 11 additions & 19 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@ jobs:
2929
- name: Describe plugin
3030
id: plugin_describe
3131
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')"
32-
- name: Import GPG key
33-
id: import_gpg
34-
uses: hashicorp/ghaction-import-gpg@v2.1.0
35-
env:
36-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
37-
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
32+
- name: Install signore
33+
uses: hashicorp/setup-signore-package@v1
34+
3835
- name: Run GoReleaser
3936
uses: goreleaser/goreleaser-action@v2
4037
with:
4138
version: latest
4239
args: release --rm-dist
4340
env:
44-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
4541
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}
42+
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}
43+
SIGNORE_CLIENT_ID: ${{ secrets.SIGNORE_CLIENT_ID }}
44+
SIGNORE_CLIENT_SECRET: ${{ secrets.SIGNORE_CLIENT_SECRET }}
45+
SIGNORE_SIGNER: ${{ secrets.SIGNORE_SIGNER }}

.goreleaser.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,10 @@ checksum:
5757
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
5858
algorithm: sha256
5959
signs:
60-
- artifacts: checksum
61-
args:
62-
# if you are using this is in a GitHub action or some other automated pipeline, you
63-
# need to pass the batch flag to indicate its not interactive.
64-
- "--batch"
65-
- "--local-user"
66-
- "{{ .Env.GPG_FINGERPRINT }}"
67-
- "--output"
68-
- "${signature}"
69-
- "--detach-sign"
70-
- "${artifact}"
60+
- cmd: signore
61+
args: ["sign", "--dearmor", "--file", "${artifact}", "--out", "${signature}"]
62+
artifacts: checksum
63+
signature: ${artifact}.sig
7164
release:
7265
# If you want to manually examine the release before its live, uncomment this line:
7366
# draft: true

0 commit comments

Comments
 (0)