feat(release): attach native Arch package and repackage for AUR
publish / Build and publish AUR packages (release) Successful in 46m31s
publish / Build and publish Ubuntu AppImage (release) Successful in 20m25s
publish / Build and publish Windows installer (release) Successful in 22m15s

Update release workflow to detect and attach the native Arch package.
Switch the binary AUR recipe to repackage the .pkg.tar.zst. Adjust
checksums and packaging steps so the output carries only the native
payload without bundling upstream package metadata.

- Attach the native .pkg.tar.zst to Gitea releases.
- Rework binary AUR recipe to extract usr from the native package.
- Update README to document using the native Arch package.
This commit is contained in:
2026-08-16 10:48:28 +02:00
parent c5f058beb1
commit 25d7f27d7a
3 changed files with 64 additions and 51 deletions
+50 -18
View File
@@ -163,7 +163,7 @@ jobs:
ARCH_PACKAGES=( ARCH_PACKAGES=(
base-devel curl git nodejs npm openssh rust base-devel curl git nodejs npm openssh rust
webkit2gtk-4.1 gtk3 hicolor-icon-theme webkit2gtk-4.1 gtk3 hicolor-icon-theme
fuse2 libappindicator-gtk3 librsvg xdotool libappindicator-gtk3 librsvg xdotool
) )
for ARCH_INSTALL_ATTEMPT in 1 2 3; do for ARCH_INSTALL_ATTEMPT in 1 2 3; do
@@ -242,15 +242,22 @@ jobs:
runuser -u builder -- \ runuser -u builder -- \
bash -lc "cd '$AUR_SOURCE_DIR' && makepkg --cleanbuild --noconfirm && makepkg --printsrcinfo > .SRCINFO" bash -lc "cd '$AUR_SOURCE_DIR' && makepkg --cleanbuild --noconfirm && makepkg --printsrcinfo > .SRCINFO"
echo "AUR_SOURCE_DIR=$AUR_SOURCE_DIR" >> "$GITHUB_ENV" ARCH_PACKAGE_PATH="$(find "$AUR_SOURCE_DIR" -maxdepth 1 -type f -name 'gitty-desktop-*.pkg.tar.zst' -print -quit)"
if [ -z "$ARCH_PACKAGE_PATH" ]; then
echo "The native Arch package was not created" >&2
exit 1
fi
- name: Generate and build binary AUR package echo "AUR_SOURCE_DIR=$AUR_SOURCE_DIR" >> "$GITHUB_ENV"
echo "ARCH_PACKAGE_PATH=$ARCH_PACKAGE_PATH" >> "$GITHUB_ENV"
- name: Attach native Arch package to Gitea release
run: | run: |
set -euo pipefail set -euo pipefail
TOKEN="${GITEA_TOKEN:-${GITEA_FALLBACK_TOKEN:-}}" TOKEN="${GITEA_TOKEN:-${GITEA_FALLBACK_TOKEN:-}}"
if [ -z "$TOKEN" ]; then if [ -z "$TOKEN" ]; then
echo "A Gitea token is required to download the AppImage" >&2 echo "A Gitea token is required to upload the native Arch package" >&2
exit 1 exit 1
fi fi
@@ -258,29 +265,54 @@ jobs:
--header "Authorization: token $TOKEN" \ --header "Authorization: token $TOKEN" \
"$GITEA_API/repos/$OWNER/$REPO/releases/tags/$RELEASE_TAG")" "$GITEA_API/repos/$OWNER/$REPO/releases/tags/$RELEASE_TAG")"
export RELEASE_JSON export RELEASE_JSON
APPIMAGE_URL="$(node -e "const r=JSON.parse(process.env.RELEASE_JSON); const a=(r.assets || []).find(a => String(a.name || '').toLowerCase().endsWith('.appimage')); if (!a?.browser_download_url) process.exit(1); process.stdout.write(a.browser_download_url)")" RELEASE_ID="$(node -e "const r=JSON.parse(process.env.RELEASE_JSON); if (!r.id) process.exit(1); process.stdout.write(String(r.id))")"
APPIMAGE_NAME="$(node -e "const r=JSON.parse(process.env.RELEASE_JSON); const a=(r.assets || []).find(a => String(a.name || '').toLowerCase().endsWith('.appimage')); if (!a?.name) process.exit(1); process.stdout.write(a.name)")" PACKAGE_NAME="${ARCH_PACKAGE_PATH##*/}"
export PACKAGE_NAME
if node -e "const r=JSON.parse(process.env.RELEASE_JSON); process.exit((r.assets || []).some(a => a.name === process.env.PACKAGE_NAME) ? 0 : 1)"; then
echo "Release asset $PACKAGE_NAME already exists; skipping upload."
else
curl --fail --location --silent --show-error \
--request POST \
--header "Authorization: token $TOKEN" \
--form "attachment=@$ARCH_PACKAGE_PATH;type=application/octet-stream" \
"$GITEA_API/repos/$OWNER/$REPO/releases/$RELEASE_ID/assets?name=$PACKAGE_NAME"
echo
echo "Attached $PACKAGE_NAME to Gitea release $RELEASE_TAG."
fi
- name: Generate and build binary AUR package
run: |
set -euo pipefail
TOKEN="${GITEA_TOKEN:-${GITEA_FALLBACK_TOKEN:-}}"
if [ -z "$TOKEN" ]; then
echo "A Gitea token is required to locate the native Arch package" >&2
exit 1
fi
RELEASE_JSON="$(curl --fail --location --silent --show-error \
--header "Authorization: token $TOKEN" \
"$GITEA_API/repos/$OWNER/$REPO/releases/tags/$RELEASE_TAG")"
export RELEASE_JSON
PACKAGE_NAME="${ARCH_PACKAGE_PATH##*/}"
export PACKAGE_NAME
PACKAGE_URL="$(node -e "const r=JSON.parse(process.env.RELEASE_JSON); const a=(r.assets || []).find(a => a.name === process.env.PACKAGE_NAME); if (!a?.browser_download_url) process.exit(1); process.stdout.write(a.browser_download_url)")"
AUR_BIN_DIR="$(mktemp -d)" AUR_BIN_DIR="$(mktemp -d)"
cp PKGBUILD-bin "$AUR_BIN_DIR/PKGBUILD" cp PKGBUILD-bin "$AUR_BIN_DIR/PKGBUILD"
APPIMAGE_PATH="$AUR_BIN_DIR/$APPIMAGE_NAME" PACKAGE_PATH="$AUR_BIN_DIR/$PACKAGE_NAME"
curl --fail --location --silent --show-error \ curl --fail --location --silent --show-error \
--header "Authorization: token $TOKEN" \ --header "Authorization: token $TOKEN" \
--output "$APPIMAGE_PATH" "$APPIMAGE_URL" --output "$PACKAGE_PATH" "$PACKAGE_URL"
APPIMAGE_CHECKSUM="$(sha256sum "$APPIMAGE_PATH" | cut -d ' ' -f 1)" PACKAGE_CHECKSUM="$(sha256sum "$PACKAGE_PATH" | cut -d ' ' -f 1)"
ICON_PATH="$AUR_BIN_DIR/gitty-desktop.png"
curl --fail --location --silent --show-error \
--output "$ICON_PATH" \
"https://git.cbsk-tech.de/Christoph/GitLite/raw/tag/$RELEASE_TAG/src-tauri/icons/icon.png"
ICON_CHECKSUM="$(sha256sum "$ICON_PATH" | cut -d ' ' -f 1)"
sed -i \ sed -i \
-e "s/^pkgver=.*/pkgver=$PACKAGE_VERSION/" \ -e "s/^pkgver=.*/pkgver=$PACKAGE_VERSION/" \
-e "s/^pkgrel=.*/pkgrel=1/" \ -e "s/^pkgrel=.*/pkgrel=1/" \
-e "s|^_appimage=.*|_appimage=\"$APPIMAGE_NAME\"|" \ -e "s|^_package=.*|_package=\"$PACKAGE_NAME\"|" \
-e "s|^_artifact_url=.*|_artifact_url=\"$APPIMAGE_URL\"|" \ -e "s|^_artifact_url=.*|_artifact_url=\"$PACKAGE_URL\"|" \
-e "s/^_tag=.*/_tag=$RELEASE_TAG/" \ -e "s/^sha256sums=.*/sha256sums=('$PACKAGE_CHECKSUM')/" \
-e "/^sha256sums=/,/^[[:space:]]*'SKIP')$/c\\sha256sums=('$APPIMAGE_CHECKSUM'\\n '$ICON_CHECKSUM')" \
"$AUR_BIN_DIR/PKGBUILD" "$AUR_BIN_DIR/PKGBUILD"
chown -R builder:builder "$AUR_BIN_DIR" chown -R builder:builder "$AUR_BIN_DIR"
+10 -30
View File
@@ -3,43 +3,23 @@
pkgname=gitty-desktop-bin pkgname=gitty-desktop-bin
pkgver=2026.8.4 pkgver=2026.8.4
pkgrel=1 pkgrel=1
pkgdesc="A lightweight, modern Git client built with Tauri (prebuilt AppImage)" pkgdesc="A lightweight, modern Git client built with Tauri (prebuilt Arch package)"
arch=('x86_64') arch=('x86_64')
url="https://git.cbsk-tech.de/Christoph/GitLite" url="https://git.cbsk-tech.de/Christoph/GitLite"
license=('MIT') license=('MIT')
depends=('fuse2' 'git' 'webkit2gtk-4.1' 'gtk3' 'hicolor-icon-theme' 'libappindicator-gtk3' 'librsvg' 'xdotool') depends=('git' 'webkit2gtk-4.1' 'gtk3' 'hicolor-icon-theme' 'libappindicator-gtk3' 'librsvg' 'xdotool')
provides=('gitty-desktop') provides=('gitty-desktop')
conflicts=('gitty-desktop') conflicts=('gitty-desktop')
options=('!strip') options=('!strip')
_appimage="Gitty_${pkgver}_amd64.AppImage" _package="gitty-desktop-${pkgver}-1-x86_64.pkg.tar.zst"
_artifact_url="https://cdn.cbsk-tech.de/gitty/${pkgver}/${_appimage}" _artifact_url="https://git.cbsk-tech.de/Christoph/GitLite/releases/download/${pkgver}/${_package}"
_tag=2026.8.4 source=("${_package}::${_artifact_url}")
source=("${_appimage}::${_artifact_url}" noextract=("${_package}")
"gitty-desktop.png::${url}/raw/tag/${_tag}/src-tauri/icons/icon.png") sha256sums=('SKIP')
sha256sums=('SKIP'
'SKIP')
package() { package() {
install -Dm755 "$srcdir/$_appimage" \ # Extract only the native package payload, without carrying its package
"$pkgdir/opt/$pkgname/gitty-desktop.AppImage" # metadata (.PKGINFO, .BUILDINFO and .MTREE) across.
install -d "$pkgdir/usr/bin" bsdtar -xf "$srcdir/$_package" -C "$pkgdir" usr
ln -s "/opt/$pkgname/gitty-desktop.AppImage" \
"$pkgdir/usr/bin/gitty-desktop"
install -Dm644 "$srcdir/gitty-desktop.png" \
"$pkgdir/usr/share/icons/hicolor/512x512/apps/gitty-desktop.png"
install -d "$pkgdir/usr/share/applications"
cat > "$pkgdir/usr/share/applications/gitty-desktop.desktop" <<-EOF
[Desktop Entry]
Type=Application
Name=Gitty
Comment=$pkgdesc
Exec=gitty-desktop
Icon=gitty-desktop
Terminal=false
Categories=Development;RevisionControl;
StartupWMClass=gitty
EOF
} }
+4 -3
View File
@@ -60,7 +60,7 @@ Install Gitty from the AUR with an AUR helper:
yay -S gitty-desktop yay -S gitty-desktop
``` ```
To install the prebuilt AppImage instead of compiling from source: To install the prebuilt native Arch package instead of compiling from source:
```bash ```bash
yay -S gitty-desktop-bin yay -S gitty-desktop-bin
@@ -75,8 +75,9 @@ makepkg -si
``` ```
The source recipe downloads the public Gitea release archive and builds Gitty. The source recipe downloads the public Gitea release archive and builds Gitty.
The `-bin` recipe installs the prebuilt AppImage. The release pipeline updates The `-bin` recipe repackages the native `.pkg.tar.zst` release artifact. The
both packages' versions, checksums, and `.SRCINFO` files. release pipeline updates both packages' versions, checksums, and `.SRCINFO`
files.
--- ---