Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Add AUR publish workflow (#585)

Maximilian Roos55e841e0b8b8
diff --git a/.github/aur/PKGBUILD b/.github/aur/PKGBUILD
new file mode 100644
index 000000000..a38f6c105
--- /dev/null
+++ b/.github/aur/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Maximilian Roos <[email protected]>
+pkgname=worktrunk-bin
+pkgver=0.0.0
+pkgrel=1
+pkgdesc="CLI for git worktree management, designed for running AI agents in parallel"
+arch=('x86_64' 'aarch64')
+url="https://github.com/max-sixty/worktrunk"
+license=('MIT OR Apache-2.0')
+provides=('worktrunk')
+conflicts=('worktrunk')
+source_x86_64=("https://github.com/max-sixty/worktrunk/releases/download/v${pkgver}/worktrunk-x86_64-unknown-linux-musl.tar.xz")
+source_aarch64=("https://github.com/max-sixty/worktrunk/releases/download/v${pkgver}/worktrunk-aarch64-unknown-linux-musl.tar.xz")
+sha256sums_x86_64=('SKIP')
+sha256sums_aarch64=('SKIP')
+
+package() {
+ cd "worktrunk-$CARCH-unknown-linux-musl"
+ install -Dm755 wt "$pkgdir/usr/bin/wt"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Fish completions
+ # TODO: a bit hacky, but short enough that copy & paste is OK for the moment
+ install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/wt.fish" <<'EOF'
+# worktrunk completions for fish
+complete --keep-order --exclusive --command wt --arguments "(test -n \"\$WORKTRUNK_BIN\"; or set -l WORKTRUNK_BIN (type -P wt 2>/dev/null); and COMPLETE=fish \$WORKTRUNK_BIN -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))"
+EOF
+}
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 0e4bf2a38..4cfbff43a 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -343,6 +343,31 @@ jobs:
git diff --cached --quiet || git commit -m "wt ${{ needs.plan.outputs.tag }}"
git push
+ publish-aur:
+ needs:
+ - plan
+ - host
+ runs-on: ubuntu-latest
+ if: ${{ needs.plan.outputs.publishing == 'true' }}
+ steps:
+ - uses: actions/checkout@v6
+ - name: Update PKGBUILD version
+ run: |
+ VERSION="${{ needs.plan.outputs.tag }}"
+ VERSION="${VERSION#v}"
+ sed -i "s/^pkgver=.*/pkgver=${VERSION}/" .github/aur/PKGBUILD
+ cat .github/aur/PKGBUILD
+ - name: Publish AUR package
+ uses: KSXGitHub/[email protected]
+ with:
+ pkgname: worktrunk-bin
+ pkgbuild: .github/aur/PKGBUILD
+ commit_username: worktrunk-bot
+ commit_email: [email protected]
+ ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
+ commit_message: Update to ${{ needs.plan.outputs.tag }}
+ updpkgsums: true
+
announce:
needs:
- plan
@@ -350,10 +375,11 @@ jobs:
- publish-cargo
- publish-winget
- publish-homebrew
+ - publish-aur
# use "always() && ..." to allow us to wait for all publish jobs while
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
- if: ${{ always() && needs.host.result == 'success' && (needs.publish-cargo.result == 'success' || needs.publish-cargo.result == 'skipped') && (needs.publish-winget.result == 'success' || needs.publish-winget.result == 'skipped') && (needs.publish-homebrew.result == 'success' || needs.publish-homebrew.result == 'skipped') }}
+ if: ${{ always() && needs.host.result == 'success' && (needs.publish-cargo.result == 'success' || needs.publish-cargo.result == 'skipped') && (needs.publish-winget.result == 'success' || needs.publish-winget.result == 'skipped') && (needs.publish-homebrew.result == 'success' || needs.publish-homebrew.result == 'skipped') && (needs.publish-aur.result == 'success' || needs.publish-aur.result == 'skipped') }}
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}