Skip to content

Commit ec44535

Browse files
committed
Update staging.yml: add build dependency for deploy-aur-nightly and improve artifact preparation logic
1 parent d7f6b4b commit ec44535

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/staging.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
deploy-aur-nightly:
4646
name: Update AUR Nightly Package
4747
runs-on: ubuntu-latest
48-
needs: prepare
49-
48+
needs: [ prepare, build ]
49+
5050
steps:
5151
- name: Checkout Repository
5252
uses: actions/checkout@v4
@@ -56,35 +56,37 @@ jobs:
5656
- name: Download Artifacts
5757
uses: actions/download-artifact@v4
5858
with:
59-
path: ./
59+
path: artifacts/
6060

6161
- name: Prepare for PKGBUILD update
6262
run: |
63+
set -euo pipefail
64+
6365
rm -rf aur-assets
6466
mkdir -p aur-assets
65-
67+
6668
find artifacts -type f -exec cp {} aur-assets/ \;
67-
69+
6870
echo "AUR asset files:"
69-
ls -la aur-assets
70-
71+
find aur-assets -maxdepth 1 -type f -printf '%f\n' | sort
72+
7173
test -f aur-assets/OpenSSH-GUI-nightly-linux-x64
7274
test -f aur-assets/appicon.png
7375
test -f aur-assets/io.github.frequency403.openssh_gui.desktop
7476
test -f LICENSE
75-
77+
7678
DATE=$(date +%Y%m%d)
7779
VERSION="${{ needs.prepare.outputs.base_version }}.${DATE}.${{ needs.prepare.outputs.git_hash }}"
7880
echo "AUR_VERSION=$VERSION" >> "$GITHUB_ENV"
79-
81+
8082
SHA_BIN=$(sha256sum aur-assets/OpenSSH-GUI-nightly-linux-x64 | cut -d' ' -f1)
8183
SHA_ICON=$(sha256sum aur-assets/appicon.png | cut -d' ' -f1)
8284
SHA_DESKTOP=$(sha256sum aur-assets/io.github.frequency403.openssh_gui.desktop | cut -d' ' -f1)
8385
SHA_LICENSE=$(sha256sum LICENSE | cut -d' ' -f1)
84-
86+
8587
sed -i "s/^pkgver=.*/pkgver=$VERSION/" openssh-gui-nightly/PKGBUILD
8688
sed -i "s/^sha256sums=.*/sha256sums=('$SHA_BIN' '$SHA_ICON' '$SHA_DESKTOP' '$SHA_LICENSE')/" openssh-gui-nightly/PKGBUILD
87-
89+
8890
echo "Updated openssh-gui-nightly PKGBUILD:"
8991
grep -E '^(pkgver=|sha256sums=)' openssh-gui-nightly/PKGBUILD
9092

0 commit comments

Comments
 (0)