Skip to content

Commit d4be350

Browse files
authored
Use signore for gpg signing (#330)
1 parent a7e02da commit d4be350

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
uses: actions/setup-go@v2
2424
with:
2525
go-version: '^1.15'
26+
- name: Setup signore
27+
uses: hashicorp/setup-signore@v1
28+
with:
29+
github-token: ${{secrets.SIGNORE_TOKEN}}
30+
client-id: $${{secrets.SIGNORE_CLIENT_ID}}
31+
client-secret: $${{secrets.SIGNORE_CLIENT_SECRET}}
2632
- name: Install hc-codesign
2733
id: codesign
2834
run: |
@@ -48,11 +54,6 @@ jobs:
4854
env:
4955
VERSION: 1.6.4
5056
SHA256SUM: 3ad66eebd443d32dd6c811dcf2d264b78678c75ed1d40c15434180d4453e60d2
51-
- name: Import PGP key for archive signing
52-
run: echo -e $PGP_KEY | base64 -di | gpg --import --batch
53-
env:
54-
GPG_TTY: $(tty)
55-
PGP_KEY: ${{ secrets.PGP_SIGNING_KEY }}
5657
- name: GitHub Release
5758
uses: goreleaser/goreleaser-action@v1
5859
with:
@@ -65,6 +66,7 @@ jobs:
6566
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
6667
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
6768
CIRCLE_TOKEN: ${{ secrets.CIRCLE_TOKEN }}
69+
SIGNORE_SIGNER: ${{secrets.SIGNORE_SIGNER}}
6870
- name: Run clamAV antivirus scanner
6971
run: sudo clamscan /home/runner/work/$REPO/$REPO/dist/
7072
env:

.goreleaser.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ checksum:
4343
algorithm: sha256
4444

4545
signs:
46-
- args: ["-u", "{{ .Env.PGP_KEY_ID }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
46+
- signature: ${artifact}.sig
47+
cmd: sh
48+
args:
49+
- -c
50+
- >-
51+
signore
52+
sign
53+
--file ${artifact}
54+
--out ${signature}
4755
artifacts: checksum
4856

4957
changelog:

0 commit comments

Comments
 (0)