Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,60 @@ jobs:
path: website/.vitepress/dist
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

# After Linux and Windows releases succeed, publish the package to the AUR (Arch User Repository)
publish-aur:
name: Publish to AUR
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Download Linux deb package from release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"
# Retry download as assets might take a minute to finalize
for attempt in 1 2 3; do
if gh release download "${{ github.ref_name }}" \
--pattern "GitWand_${VERSION}_amd64.deb" \
--dir . \
--repo "${{ github.repository }}" 2>&1; then
break
fi
echo "::warning::Deb package not yet available on release ${{ github.ref_name }} (attempt $attempt/3) — sleeping 15s"
sleep 15
done
[ -f "GitWand_${VERSION}_amd64.deb" ] || { echo "::error::Deb package missing or empty after retries"; exit 1; }

- name: Generate PKGBUILD from template
run: |
set -euo pipefail
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"

# Calculate checksums
SHA256_DEB=$(sha256sum "GitWand_${VERSION}_amd64.deb" | awk '{print $1}')
SHA256_LICENSE=$(sha256sum LICENSE | awk '{print $1}')

# Replace placeholders in template
sed -e "s/#VERSION#/${VERSION}/g" \
-e "s/#SHA256_DEB#/${SHA256_DEB}/g" \
-e "s/#SHA256_LICENSE#/${SHA256_LICENSE}/g" \
scripts/PKGBUILD.template > PKGBUILD

echo "=== Generated PKGBUILD ==="
cat PKGBUILD

- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v3
with:
pkgname: gitwand-bin
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}

29 changes: 29 additions & 0 deletions scripts/PKGBUILD.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Maintainer: Laurent Guitton <laurent@devlint.fr>
# Contributor: GitWand Release Bot <actions@github.com>

pkgname=gitwand-bin
pkgver=#VERSION#
pkgrel=1
pkgdesc="Automatic Git merge conflict resolution desktop client"
arch=('x86_64')
url="https://github.com/devlint/GitWand"
license=('MIT')
depends=('webkit2gtk-4.1' 'gtk3' 'libayatana-appindicator' 'xdotool' 'nss' 'libxtst')
provides=('gitwand')
conflicts=('gitwand')
source_x86_64=(
"https://github.com/devlint/GitWand/releases/download/v${pkgver}/GitWand_${pkgver}_amd64.deb"
"LICENSE::https://raw.githubusercontent.com/devlint/GitWand/v${pkgver}/LICENSE"
)
sha256sums_x86_64=(
'#SHA256_DEB#'
'#SHA256_LICENSE#'
)

package() {
# Extract the Debian data file
bsdtar -xf data.tar.* -C "${pkgdir}"

# Install the license file
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
2 changes: 1 addition & 1 deletion website/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GitWand is available as a desktop app, a CLI tool, and a VS Code extension. Inst
Download the latest release for your platform:

- **macOS** — `.dmg` (Universal: Apple Silicon + Intel)
- **Linux** — `.AppImage` or `.deb`
- **Linux** — `.AppImage` or `.deb` (also available in the AUR as `gitwand-bin`)
- **Windows** — `.msi` or `.exe`

👉 [Download from GitHub Releases](https://github.com/devlint/GitWand/releases)
Expand Down
Loading