From 718a8d1bfe59759fc38902c1b857ac0a99c9f558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bir=C3=B3=2C=20Csaba=20Attila?= Date: Thu, 16 Apr 2026 13:50:50 +0200 Subject: [PATCH] ci: add AUR package publishing for Arch Linux Add GitHub Actions workflow to automatically update the copia-cli-bin AUR package on release. Initial PKGBUILD already pushed to AUR. Closes #161 --- .github/workflows/aur.yml | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/aur.yml diff --git a/.github/workflows/aur.yml b/.github/workflows/aur.yml new file mode 100644 index 0000000..58457de --- /dev/null +++ b/.github/workflows/aur.yml @@ -0,0 +1,54 @@ +name: Publish to AUR + +on: + release: + types: [released] + +jobs: + aur: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Extract version + id: version + run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" + + - name: Get checksums + id: checksums + run: | + gh release download "${{ github.ref_name }}" --pattern "checksums.txt" --output checksums.txt + echo "sha256_x86_64=$(grep 'linux_amd64.tar.gz' checksums.txt | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" + echo "sha256_aarch64=$(grep 'linux_arm64.tar.gz' checksums.txt | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to AUR + uses: KSXGitHub/github-actions-deploy-aur@v3 + with: + pkgname: copia-cli-bin + pkgbuild: | + # Maintainer: Qubernetic + pkgname=copia-cli-bin + pkgver=${{ steps.version.outputs.version }} + pkgrel=1 + pkgdesc="CLI for Copia — source control for industrial automation" + arch=('x86_64' 'aarch64') + url="https://github.com/qubernetic/copia-cli" + license=('AGPL-3.0-only') + provides=('copia-cli') + conflicts=('copia-cli') + + source_x86_64=("\${url}/releases/download/v\${pkgver}/copia-cli_\${pkgver}_linux_amd64.tar.gz") + source_aarch64=("\${url}/releases/download/v\${pkgver}/copia-cli_\${pkgver}_linux_arm64.tar.gz") + sha256sums_x86_64=('${{ steps.checksums.outputs.sha256_x86_64 }}') + sha256sums_aarch64=('${{ steps.checksums.outputs.sha256_aarch64 }}') + + package() { + install -Dm755 copia-cli "\${pkgdir}/usr/bin/copia-cli" + install -Dm644 LICENSE "\${pkgdir}/usr/share/licenses/\${pkgname}/LICENSE" + } + commit_username: qubernetic + commit_email: hello@qubernetic.io + ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} + commit_message: "Update to ${{ steps.version.outputs.version }}"