Skip to content

Commit b1b204e

Browse files
committed
import gpg key in snapshotter
1 parent a741334 commit b1b204e

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
goreleaser:
13+
environment: goreleaser
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout
@@ -23,6 +24,7 @@ jobs:
2324
go-version: stable
2425

2526
- name: Import GPG key
27+
id: import_gpg
2628
uses: crazy-max/ghaction-import-gpg@v6
2729
with:
2830
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
@@ -57,4 +59,4 @@ jobs:
5759
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
5860
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
5961
AUR_KEY: ${{ secrets.AUR_KEY }}
60-
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
62+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.github/workflows/snapshot.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
snapshot:
11+
environment: goreleaser
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout
@@ -19,12 +20,20 @@ jobs:
1920
uses: actions/setup-go@v5
2021
with:
2122
go-version: stable
22-
23+
24+
- name: Import GPG key
25+
id: import_gpg
26+
uses: crazy-max/ghaction-import-gpg@v6
27+
with:
28+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
29+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
30+
2331
- name: Test GoReleaser
2432
uses: goreleaser/goreleaser-action@v6
2533
with:
2634
distribution: goreleaser-pro
2735
version: "~> v2"
2836
args: release --snapshot --clean --skip=publish
2937
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ release:
402402

403403
# Sign checksums and artifacts
404404
signs:
405-
- cmd: gpg
405+
- cmd: gpg2
406406
args:
407407
- "--batch"
408-
- "--local-user"
408+
- "-u"
409409
- "{{ .Env.GPG_FINGERPRINT }}"
410410
- "--output"
411411
- "${signature}"

0 commit comments

Comments
 (0)