Skip to content

Commit 025f343

Browse files
committed
Use --passphrase-fd with stdin instead of gpg-agent for GPG signing
1 parent e18f597 commit 025f343

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.goreleaser.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,34 @@ signs:
4242
- id: checksum
4343
artifacts: checksum
4444
args:
45-
# Use gpg-agent with preset passphrase (set in GitHub Actions workflow)
45+
# Use passphrase from environment variable via file descriptor
4646
- "--batch"
4747
- "--pinentry-mode"
4848
- "loopback"
49-
- "--use-agent"
49+
- "--passphrase-fd"
50+
- "0"
5051
- "--local-user"
5152
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
5253
- "--output"
5354
- "${signature}"
5455
- "--detach-sign"
5556
- "${artifact}"
57+
stdin: "{{ .Env.GPG_PASSPHRASE }}"
5658
- id: archive
5759
artifacts: archive
5860
args:
5961
- "--batch"
6062
- "--pinentry-mode"
6163
- "loopback"
62-
- "--use-agent"
64+
- "--passphrase-fd"
65+
- "0"
6366
- "--local-user"
6467
- "{{ .Env.GPG_FINGERPRINT }}"
6568
- "--output"
6669
- "${signature}"
6770
- "--detach-sign"
6871
- "${artifact}"
72+
stdin: "{{ .Env.GPG_PASSPHRASE }}"
6973
release:
7074
# If you want to manually examine the release before its live, uncomment this line:
7175
draft: true

0 commit comments

Comments
 (0)