feat(aur): add qbz and qbz-git source-build packages

Add PKGBUILDs and GitHub Actions workflows for:
- qbz: compiles from release source tarball
- qbz-git: compiles from main branch (updates on push)
Fix --bundles none -> --no-bundle for Tauri 2.0 CLI
This commit is contained in:
vicrodh committed 2026-03-04 12:45:10 -06:00
1 parent 18b7bcaf31
commit e39eb6fa6f
5 files changed
+344 -1

No files matched your search

+98
View File
@@ -0,0 +1,98 @@
name: release-aur-git
on:
push:
branches: [main]
paths-ignore:
- '*.md'
- 'docs/**'
- '.github/workflows/release-aur.yml'
- '.github/workflows/release-aur-source.yml'
workflow_dispatch:
concurrency:
group: aur-git-publish
cancel-in-progress: true
permissions:
contents: read
jobs:
update-aur:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history needed for pkgver()
- name: Compute pkgver
id: pkgver
run: |
REVCOUNT=$(git rev-list --count HEAD)
SHORTHASH=$(git rev-parse --short HEAD)
PKGVER="r${REVCOUNT}.${SHORTHASH}"
echo "pkgver=$PKGVER" >> "$GITHUB_OUTPUT"
echo "Computed pkgver: $PKGVER"
- name: Setup SSH for AUR
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$AUR_SSH_PRIVATE_KEY" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
echo "Host aur.archlinux.org" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/aur" >> ~/.ssh/config
echo " User aur" >> ~/.ssh/config
ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts
- name: Clone AUR repo
run: |
git clone ssh://aur@aur.archlinux.org/qbz-git.git /tmp/aur-qbz-git
cd /tmp/aur-qbz-git
git checkout master 2>/dev/null || git checkout -b master
- name: Update PKGBUILD
env:
PKGVER: ${{ steps.pkgver.outputs.pkgver }}
run: |
cd /tmp/aur-qbz-git
# Copy PKGBUILD from main repo (source of truth)
cp ${{ github.workspace }}/packaging/aur-git/PKGBUILD .
# Update pkgver to current value (so .SRCINFO reflects it)
sed -i "s/^pkgver=.*/pkgver=${PKGVER}/" PKGBUILD
echo "=== Updated PKGBUILD ==="
cat PKGBUILD
- name: Generate .SRCINFO
run: |
cd /tmp/aur-qbz-git
docker run --rm -v "$PWD":/pkg -w /pkg -e HOST_UID=$(id -u) -e HOST_GID=$(id -g) archlinux:latest bash -c "
pacman -Sy --noconfirm pacman-contrib sudo git
useradd -m builder
chown -R builder:builder /pkg
sudo -u builder makepkg --printsrcinfo > .SRCINFO
chown -R \$HOST_UID:\$HOST_GID /pkg
"
cat .SRCINFO
- name: Commit and push to AUR
env:
PKGVER: ${{ steps.pkgver.outputs.pkgver }}
run: |
cd /tmp/aur-qbz-git
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add PKGBUILD .SRCINFO
# Only commit if there are changes
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "Update to ${PKGVER}"
git push
fi
+148
View File
@@ -0,0 +1,148 @@
name: release-aur-source
on:
# Trigger after release-linux completes (same as qbz-bin)
workflow_run:
workflows: ["release-linux"]
types: [completed]
workflow_dispatch:
inputs:
version:
description: "Version to publish (e.g. 1.1.18)"
required: true
type: string
pkgrel:
description: "Package release number (bump for same-version rebuilds)"
required: false
default: "1"
type: string
concurrency:
group: aur-source-publish
cancel-in-progress: false
permissions:
contents: read
jobs:
update-aur:
runs-on: ubuntu-latest
# Only run on manual dispatch, or successful stable tag releases (no -rc)
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'v') && !contains(github.event.workflow_run.head_branch, '-rc')) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Determine version
id: version
env:
EVENT_NAME: ${{ github.event_name }}
WORKFLOW_HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
DISPATCH_VERSION: ${{ inputs.version }}
run: |
if [[ "$EVENT_NAME" == "workflow_run" ]]; then
REF="$WORKFLOW_HEAD_BRANCH"
if [[ ! "$REF" =~ ^v[0-9]+(\.[0-9]+){1,3}([.-][0-9A-Za-z.-]+)?$ ]]; then
echo "Invalid workflow_run head branch for release: $REF"
exit 1
fi
VERSION="${REF#v}"
else
VERSION="$DISPATCH_VERSION"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Detected version: $VERSION"
- name: Wait for source tarball
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
echo "Verifying GitHub source archive is available..."
SOURCE_URL="https://github.com/vicrodh/qbz/archive/refs/tags/v${VERSION}.tar.gz"
HTTP_CODE=$(curl -sL -o /dev/null -w "%{http_code}" "$SOURCE_URL")
if [[ "$HTTP_CODE" != "200" ]]; then
echo "Source archive not found at $SOURCE_URL (HTTP $HTTP_CODE)"
exit 1
fi
echo "Source archive available"
- name: Get source tarball checksum
id: checksums
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
SOURCE_URL="https://github.com/vicrodh/qbz/archive/refs/tags/v${VERSION}.tar.gz"
echo "Downloading: $SOURCE_URL"
curl -fsSL -o /tmp/qbz-source.tar.gz "$SOURCE_URL"
SHA256=$(sha256sum /tmp/qbz-source.tar.gz | cut -d' ' -f1)
echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
echo "Source checksum: $SHA256"
- name: Setup SSH for AUR
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$AUR_SSH_PRIVATE_KEY" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
echo "Host aur.archlinux.org" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/aur" >> ~/.ssh/config
echo " User aur" >> ~/.ssh/config
ssh-keyscan -t ed25519 aur.archlinux.org >> ~/.ssh/known_hosts
- name: Clone AUR repo
run: |
git clone ssh://aur@aur.archlinux.org/qbz.git /tmp/aur-qbz
cd /tmp/aur-qbz
git checkout master 2>/dev/null || git checkout -b master
- name: Determine pkgrel
id: pkgrel
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "pkgrel=${{ inputs.pkgrel || '1' }}" >> "$GITHUB_OUTPUT"
else
echo "pkgrel=1" >> "$GITHUB_OUTPUT"
fi
- name: Update PKGBUILD
env:
VERSION: ${{ steps.version.outputs.version }}
PKGREL: ${{ steps.pkgrel.outputs.pkgrel }}
SHA256: ${{ steps.checksums.outputs.sha256 }}
run: |
cd /tmp/aur-qbz
# Copy PKGBUILD from main repo (source of truth)
cp ${{ github.workspace }}/packaging/aur-source/PKGBUILD .
# Update version, pkgrel, and checksum
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=${PKGREL}/" PKGBUILD
sed -i "s/^sha256sums=.*/sha256sums=('${SHA256}')/" PKGBUILD
echo "=== Updated PKGBUILD ==="
cat PKGBUILD
- name: Generate .SRCINFO
run: |
cd /tmp/aur-qbz
docker run --rm -v "$PWD":/pkg -w /pkg -e HOST_UID=$(id -u) -e HOST_GID=$(id -g) archlinux:latest bash -c "
pacman -Sy --noconfirm pacman-contrib sudo
useradd -m builder
chown -R builder:builder /pkg
sudo -u builder makepkg --printsrcinfo > .SRCINFO
chown -R \$HOST_UID:\$HOST_GID /pkg
"
cat .SRCINFO
- name: Commit and push to AUR
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
cd /tmp/aur-qbz
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add PKGBUILD .SRCINFO
git commit -m "Update to v${VERSION}"
git push