@@ -10,15 +10,59 @@ jobs:
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Checkout
13- uses : actions/checkout@v4
13+ uses : actions/checkout@v6
1414 with :
1515 fetch-depth : 0
1616
1717 - name : Run Make
18- run : make BUILD_TYPE=DEBUG
18+ run : make BUILD_TYPE=RELEASE
1919
2020 - name : Upload Artifacts
2121 uses : actions/upload-artifact@v4
2222 with :
2323 name : build_artifacts
24- path : build/*
24+ path : build/*
25+
26+ publish_to_aur :
27+ needs : build
28+ runs-on : ubuntu-latest
29+ steps :
30+ - name : Checkout Source
31+ uses : actions/checkout@v6
32+ with :
33+ fetch-depth : 0
34+
35+ - name : Install AUR tools
36+ run : |
37+ sudo apt-get update
38+ sudo apt-get install -y git openssh-client makepkg
39+
40+ - name : Setup SSH for AUR
41+ run : |
42+ mkdir -p ~/.ssh
43+ echo "${{ secrets.AUR_KEY }}" > ~/.ssh/rsa_aur
44+ chmod 600 ~/.ssh/rsa_aur
45+ ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
46+
47+ - name : Extract version from tag
48+ id : version
49+ run : |
50+ VERSION=${GITHUB_REF#refs/tags/v}
51+ echo "version=$VERSION" >> $GITHUB_OUTPUT
52+
53+ - name : Update chibi-git AUR
54+ run : |
55+ git clone ssh://aur@aur.archlinux.org/chibi-cli-git.git
56+ cd chibi-git
57+
58+ # bump pkgrel to trigger rebuild
59+ current=$(grep '^pkgrel=' PKGBUILD | cut -d= -f2)
60+ next=$((current+1))
61+ sed -i "s/^pkgrel=.*/pkgrel=$next/" PKGBUILD
62+
63+ makepkg --printsrcinfo > .SRCINFO
64+
65+ git config user.name "github-actions"
66+ git config user.email "actions@github.com"
67+ git commit -am "update"
68+ git push
0 commit comments