varde in the uhhm Arch registry

dist/arch/PKGBUILD packages the release tarballs: system and per-user
units, the per-user socket on for every session (as PipeWire's is; the
daemon starts only when an app connects), config and man pages. The
release workflow publishes it for x86_64 and aarch64 from klokka.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-10-03 12:43:46 +02:00
co-authored by Claude Opus 5.5
parent b7752da694
commit 3382a42b99
3 changed files with 93 additions and 0 deletions
+42
View File
@@ -89,3 +89,45 @@ jobs:
-H "Authorization: token $TOKEN" \
-F "attachment=@$f"
done
# The uhhm Arch registry (pacman.conf: .../api/packages/bl/arch/uhhm),
# from the tarballs just released. On klokka: an Arch host with
# makepkg. REGISTRY_TOKEN is the uhhm org's write:package token.
publish:
needs: build
runs-on: aarch64
steps:
- name: checkout
uses: builtin:checkout
- name: fetch tarballs and pin the PKGBUILD
run: |
set -eu
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
BASE="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/download/${TAG}"
cd dist/arch
for t in x86_64 aarch64; do
f="varde-${VERSION}-${t}-unknown-linux-gnu.tar.gz"
# The repo is private: anonymous release downloads 404.
curl -fsSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o "$f" "$BASE/$f"
done
SUM_X86=$(sha256sum "varde-${VERSION}-x86_64-unknown-linux-gnu.tar.gz" | cut -d' ' -f1)
SUM_AARCH=$(sha256sum "varde-${VERSION}-aarch64-unknown-linux-gnu.tar.gz" | cut -d' ' -f1)
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
sed -i "s/sha256sums_x86_64=('.*')/sha256sums_x86_64=('${SUM_X86}')/" PKGBUILD
sed -i "s/sha256sums_aarch64=('.*')/sha256sums_aarch64=('${SUM_AARCH}')/" PKGBUILD
- name: publish to the uhhm Arch registry
run: |
set -eu
if [ -z "${{ secrets.REGISTRY_TOKEN }}" ]; then
echo "::error::REGISTRY_TOKEN not set - add it to publish"
exit 1
fi
cd dist/arch
for carch in aarch64 x86_64; do
pkgfile=$(CARCH="$carch" makepkg --packagelist | tail -1)
CARCH="$carch" makepkg -f --nodeps --noconfirm
curl --fail-with-body --user "bl:${{ secrets.REGISTRY_TOKEN }}" \
--upload-file "$pkgfile" \
"${GITHUB_SERVER_URL}/api/packages/bl/arch/uhhm"
done