Skip to content

Commit 01045b7

Browse files
committed
Make GPG_PASSPHRASE optional - support keys without passphrase
1 parent a6d4709 commit 01045b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.goreleaser.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ signs:
4242
- id: checksum
4343
artifacts: checksum
4444
args:
45-
# Use passphrase directly from environment variable
45+
# If GPG_PASSPHRASE is empty, don't use --passphrase flag (for keys without passphrase)
4646
- "--batch"
4747
- "--yes"
4848
- "--no-tty"
4949
- "--pinentry-mode"
5050
- "loopback"
51+
{{- if .Env.GPG_PASSPHRASE }}
5152
- "--passphrase"
5253
- "{{ .Env.GPG_PASSPHRASE }}"
54+
{{- end }}
5355
- "--local-user"
5456
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
5557
- "--output"
@@ -64,8 +66,10 @@ signs:
6466
- "--no-tty"
6567
- "--pinentry-mode"
6668
- "loopback"
69+
{{- if .Env.GPG_PASSPHRASE }}
6770
- "--passphrase"
6871
- "{{ .Env.GPG_PASSPHRASE }}"
72+
{{- end }}
6973
- "--local-user"
7074
- "{{ .Env.GPG_FINGERPRINT }}"
7175
- "--output"

0 commit comments

Comments
 (0)