Skip to content

Commit ff61000

Browse files
committed
provide passphrase with nfpm env
1 parent 75bd37b commit ff61000

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

release-rpm.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ set -euo pipefail
99
TEMP_KEY_FILE=$(mktemp)
1010
echo "$GPG_PRIVATE_KEY" > "$TEMP_KEY_FILE"
1111

12-
# Import key into GPG keyring with passphrase
13-
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 --import "$TEMP_KEY_FILE"
12+
# Import key into GPG keyring
13+
gpg --batch --import "$TEMP_KEY_FILE"
1414

15-
# Set environment variable for GoReleaser to use the key file path
15+
# Set environment variables for GoReleaser
1616
export GPG_PRIVATE_KEY="$TEMP_KEY_FILE"
17-
export GPG_PASSPHRASE
17+
export NFPM_LINUX_PACKAGES_RPM_PASSPHRASE="$GPG_PASSPHRASE"
1818

1919
goreleaser release --clean --config goreleaser.rpm.yaml --snapshot
2020

0 commit comments

Comments
 (0)