Skip to content

Commit d33d27e

Browse files
committed
feat(forge): validate rpm signing
1 parent e2b1357 commit d33d27e

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/actions/build-electron/action.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ runs:
5555
security set-keychain-settings -t 3600 -l build-app-${{ github.run_id }}.keychain
5656
security set-keychain-settings -t 3600 -l build-installer-${{ github.run_id }}.keychain
5757
58-
- name: Import GPG signing key
59-
if: inputs.os == 'linux'
60-
shell: ${{ inputs.shell }}
61-
run: |
62-
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
63-
6458
- name: Set up Python and other macOS dependencies
6559
if: ${{ inputs.os == 'macos' }}
6660
shell: ${{ inputs.shell }}
@@ -168,3 +162,22 @@ runs:
168162
echo "Found ZIP: $zip_file"
169163
echo "Note: ZIP files are not code signed, but their contents should be"
170164
fi
165+
166+
- name: Import GPG signing key
167+
if: inputs.os == 'linux'
168+
shell: ${{ inputs.shell }}
169+
run: |
170+
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
171+
172+
# Import the key into RPM for verification
173+
gpg --export -a > pubkey
174+
rpm --import pubkey
175+
rm pubkey
176+
177+
# Validate code signing
178+
rpm_file=$(find ./apps/desktop/dist -name "*.rpm" -print -quit)
179+
if ! rpm -K "$rpm_file" | grep -q "digests signatures OK"; then
180+
echo .rpm file not signed
181+
rpm -Kv "$rpm_file"
182+
exit 1
183+
fi

0 commit comments

Comments
 (0)