Skip to content

Commit e112d9a

Browse files
committed
ci: write GPG key to file and pass it to GoReleaser
1 parent 69c36b7 commit e112d9a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/cd.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
with:
2020
username: ${{ secrets.DOCKER_HUB_USERNAME }}
2121
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
22+
- uses: "DamianReeves/write-file-action@master"
23+
with:
24+
path: /tmp/gpg_key
25+
write-mode: overwrite
26+
contents: ${{ secrets.GPG_PRIVATE_KEY }}
2227
- id: import_gpg
2328
uses: crazy-max/ghaction-import-gpg@v5
2429
with:
@@ -29,7 +34,7 @@ jobs:
2934
version: latest
3035
args: release
3136
env:
32-
GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
37+
GPG_KEY_FILE: /tmp/gpg_key
3338
NFPM_PACKAGES_DEB_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3439
NFPM_PACKAGES_RPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3540
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}

.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ nfpms:
6868
- rpm
6969
deb:
7070
signature:
71-
key_file: '{{ .Env.GPG_KEY }}'
71+
key_file: '{{ .Env.GPG_KEY_FILE }}'
7272
rpm:
7373
signature:
74-
key_file: '{{ .Env.GPG_KEY }}'
74+
key_file: '{{ .Env.GPG_KEY_FILE }}'
7575
publishers:
7676
- name: fury.io
7777
ids:

0 commit comments

Comments
 (0)