Skip to content

Commit 4918a80

Browse files
committed
change nfpms signing to embedded
1 parent cab8ee9 commit 4918a80

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

.github/workflows/release.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
4141
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
4242
passphrase: ${{ secrets.GPG_PASSPHRASE }}
4343

44+
- name: Create GPG key file
45+
run: |
46+
echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg-private-key.asc
47+
chmod 600 gpg-private-key.asc
48+
4449
- name: Set up keychain
4550
run: |
4651
echo -n $SIGNING_CERTIFICATE_BASE64 | base64 -d -o ./ApplicationID.p12
@@ -71,7 +76,12 @@ jobs:
7176
env:
7277
GITHUB_TOKEN: ${{ secrets.CLI_RELEASE }}
7378
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
79+
GPG_KEY_PATH: ./gpg-private-key.asc
7480

81+
- name: Clean up GPG key file
82+
run: |
83+
rm -f gpg-private-key.asc
84+
7585
# artifacts need to be passed to the "publish-apt" job somehow
7686
- name: Upload artifacts to workflow
7787
uses: actions/upload-artifact@v4

.goreleaser.yaml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,26 @@ nfpms:
9898
formats:
9999
- deb
100100
- rpm
101+
# The package is signed if a key_file is set
102+
signature:
103+
# PGP secret key file path (can also be ASCII-armored).
104+
#
105+
# See "Signing key passphrases" below for more information.
106+
#
107+
# Templates: allowed.
108+
key_file: "{{ .Env.GPG_KEY_PATH }}"
101109

102-
signs:
103-
- artifacts: package
104-
args:
105-
[
106-
"-u",
107-
"{{ .Env.GPG_FINGERPRINT }}",
108-
"--output",
109-
"${signature}",
110-
"--detach-sign",
111-
"${artifact}",
112-
]
110+
# signs:
111+
# - artifacts: package
112+
# args:
113+
# [
114+
# "-u",
115+
# "{{ .Env.GPG_FINGERPRINT }}",
116+
# "--output",
117+
# "${signature}",
118+
# "--detach-sign",
119+
# "${artifact}",
120+
# ]
113121

114122
# homebrew_casks:
115123
# - name: stackit

scripts/publish-rpm-packages.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,30 @@ mkdir -p rpm-repo/aarch64
2525
# Copy RPM packages and signatures to appropriate architecture directories
2626
printf "\n>>> Copying RPM packages and signatures to architecture directories \n"
2727

28+
# Copy RPM packages to appropriate architecture directories
29+
printf "\n>>> Copying RPM packages to architecture directories \n"
30+
2831
# Copy x86_64 packages (amd64)
29-
for file in ${GORELEASER_PACKAGES_FOLDER}*_amd64.rpm*; do
30-
if [ -f "$file" ]; then
31-
cp "$file" rpm-repo/x86_64/
32-
printf "Copied $(basename "$file") to x86_64/\n"
32+
for rpm_file in ${GORELEASER_PACKAGES_FOLDER}*_amd64.rpm; do
33+
if [ -f "$rpm_file" ]; then
34+
cp "$rpm_file" rpm-repo/x86_64/
35+
printf "Copied $(basename "$rpm_file") to x86_64/\n"
3336
fi
3437
done
3538

3639
# Copy i386 packages
37-
for file in ${GORELEASER_PACKAGES_FOLDER}*_386.rpm*; do
38-
if [ -f "$file" ]; then
39-
cp "$file" rpm-repo/i386/
40-
printf "Copied $(basename "$file") to i386/\n"
40+
for rpm_file in ${GORELEASER_PACKAGES_FOLDER}*_386.rpm; do
41+
if [ -f "$rpm_file" ]; then
42+
cp "$rpm_file" rpm-repo/i386/
43+
printf "Copied $(basename "$rpm_file") to i386/\n"
4144
fi
4245
done
4346

4447
# Copy aarch64 packages (arm64)
45-
for file in ${GORELEASER_PACKAGES_FOLDER}*_arm64.rpm*; do
46-
if [ -f "$file" ]; then
47-
cp "$file" rpm-repo/aarch64/
48-
printf "Copied $(basename "$file") to aarch64/\n"
48+
for rpm_file in ${GORELEASER_PACKAGES_FOLDER}*_arm64.rpm; do
49+
if [ -f "$rpm_file" ]; then
50+
cp "$rpm_file" rpm-repo/aarch64/
51+
printf "Copied $(basename "$rpm_file") to aarch64/\n"
4952
fi
5053
done
5154

0 commit comments

Comments
 (0)