-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (35 loc) · 1.28 KB
/
aur-update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update the AUR package
on:
workflow_dispatch:
release:
types: [published]
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Get the latest release"
id: latest_release
uses: InsonusK/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
exclude_types: "draft|prerelease"
view_top: 1
- uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "CheatBreakerNet/Launcher"
version: "tags/${{ steps.latest_release.outputs.tag_name }}"
file: "CheatBreaker.AppImage"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update the PKG version in the PKGBUILD
run: |
sed -i 's/^pkgver=.*/pkgver=${{ steps.latest_release.outputs.tag_name }}/' ./AUR/PKGBUILD
sed -i "s#^md5sums=.*#md5sums=('$(md5sum ./CheatBreaker.AppImage | cut -d' ' -f1)')#" ./AUR/PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: cheatbreaker
pkgbuild: ./AUR/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}