Skip to content

Commit 433d2c7

Browse files
committed
ci: fix windows assets and ppa signing
1 parent 890a10c commit 433d2c7

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/release-ppa.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ jobs:
4646
exit 1
4747
4848
- name: Import GPG key
49+
id: gpg
4950
env:
5051
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
5152
run: |
5253
set -euo pipefail
5354
test -n "$GPG_PRIVATE_KEY"
5455
printf '%s\n' "$GPG_PRIVATE_KEY" | gpg --batch --import
56+
fingerprint="$(gpg --batch --list-secret-keys --with-colons | awk -F: '/^fpr:/ {print $10; exit}')"
57+
test -n "$fingerprint"
58+
echo "fingerprint=$fingerprint" >> "$GITHUB_OUTPUT"
5559
5660
- name: Prepare source package
5761
run: |
@@ -85,7 +89,7 @@ jobs:
8589
run: |
8690
set -euo pipefail
8791
cd "seerrng-${{ steps.version.outputs.version }}"
88-
debuild -S -sa
92+
debuild -S -sa -k"${{ steps.gpg.outputs.fingerprint }}"
8993
9094
- name: Upload to Launchpad
9195
env:

scripts/build-release-assets.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,20 @@ if [[ "$os" == "windows" ]]; then
6767
if command -v zip >/dev/null 2>&1; then
6868
(cd "$work_dir" && zip -qr "${dist_abs}/${asset}.zip" "$asset")
6969
elif command -v powershell.exe >/dev/null 2>&1; then
70+
archive_path="${dist_abs}/${asset}.zip"
71+
if command -v cygpath >/dev/null 2>&1; then
72+
powershell_source="$(cygpath -w "${work_dir}/${asset}")"
73+
powershell_archive="$(cygpath -w "$archive_path")"
74+
else
75+
powershell_source="${work_dir}/${asset}"
76+
powershell_archive="$archive_path"
77+
fi
7078
powershell.exe -NoProfile -Command \
71-
"Compress-Archive -Path '${work_dir}/${asset}' -DestinationPath '${dist_abs}/${asset}.zip' -Force"
79+
"Compress-Archive -Path '${powershell_source}' -DestinationPath '${powershell_archive}' -Force"
7280
elif command -v powershell >/dev/null 2>&1; then
81+
archive_path="${dist_abs}/${asset}.zip"
7382
powershell -NoProfile -Command \
74-
"Compress-Archive -Path '${work_dir}/${asset}' -DestinationPath '${dist_abs}/${asset}.zip' -Force"
83+
"Compress-Archive -Path '${work_dir}/${asset}' -DestinationPath '${archive_path}' -Force"
7584
else
7685
echo "zip or PowerShell Compress-Archive is required to build Windows assets" >&2
7786
exit 1

0 commit comments

Comments
 (0)