Skip to content

💚 Added AUR Publishing #86

💚 Added AUR Publishing

💚 Added AUR Publishing #86

Workflow file for this run

name: Build (Multiple Arch)
on:
pull_request:
workflow_dispatch:
jobs:
build:
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Run Make
run: make BUILD_TYPE=RELEASE
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build_artifacts
path: build/*
publish_to_aur:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install AUR tools
run: |
sudo apt-get update
sudo apt-get install -y git openssh-client makepkg
- name: Setup SSH for AUR
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_KEY }}" > ~/.ssh/rsa_aur
chmod 600 ~/.ssh/rsa_aur
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Update chibi-git AUR
run: |
git clone ssh://aur@aur.archlinux.org/chibi-cli-git.git
cd chibi-git
# bump pkgrel to trigger rebuild
current=$(grep '^pkgrel=' PKGBUILD | cut -d= -f2)
next=$((current+1))
sed -i "s/^pkgrel=.*/pkgrel=$next/" PKGBUILD
makepkg --printsrcinfo > .SRCINFO
git config user.name "github-actions"
git config user.email "actions@github.com"
git commit -am "update"
git push