File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update AUR Package
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ update-aur :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout main repo
13+ uses : actions/checkout@v4
14+ with :
15+ repository : Matars/gitfetch
16+ path : gitfetch
17+
18+ - name : Get version from pyproject.toml
19+ id : get_version
20+ run : |
21+ VERSION=$(grep '^version =' gitfetch/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
22+ echo "version=$VERSION" >> $GITHUB_OUTPUT
23+
24+ - name : Checkout AUR repo
25+ uses : actions/checkout@v4
26+ with :
27+ repository : Matars/aur-gitfetch
28+ token : ${{ secrets.AUR_TAP_TOKEN }}
29+ path : aur-repo
30+
31+ - name : Update PKGBUILD
32+ run : |
33+ cd aur-repo
34+ VERSION=${{ steps.get_version.outputs.version }}
35+ sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD
36+ sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
37+
38+ - name : Commit and push
39+ run : |
40+ cd aur-repo
41+ git config user.name "GitHub Actions"
42+ git config user.email "actions@github.com"
43+ git add PKGBUILD
44+ git commit -m "Update gitfetch to v${{ steps.get_version.outputs.version }}"
45+ git push
You can’t perform that action at this time.
0 commit comments