File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,20 @@ set -euo pipefail
55: " ${GPG_PRIVATE_KEY:? GPG_PRIVATE_KEY must be set} "
66: " ${GPG_PASSPHRASE:? GPG_PASSPHRASE must be set} "
77
8- export GPG_PRIVATE_KEY
9- export GPG_PASSPHRASE
8+ # Create temporary GPG key file
9+ TEMP_KEY_FILE=$( mktemp)
10+ echo " $GPG_PRIVATE_KEY " > " $TEMP_KEY_FILE "
11+
12+ # Import key into GPG keyring
13+ gpg --batch --import " $TEMP_KEY_FILE "
1014
11- gpg --batch --import <<< " $GPG_PRIVATE_KEY"
15+ # Set environment variable for GoReleaser to use the key file path
16+ export GPG_PRIVATE_KEY=" $TEMP_KEY_FILE "
17+ export GPG_PASSPHRASE
1218
1319goreleaser release --clean --config goreleaser.rpm.yaml --snapshot
1420
21+ # Clean up
22+ rm -f " $TEMP_KEY_FILE "
23+
1524echo " RPM build complete. Find RPMs in ./dist/"
You can’t perform that action at this time.
0 commit comments