-
Notifications
You must be signed in to change notification settings - Fork 9
34 lines (29 loc) · 1.05 KB
/
aur.yml
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
name: aur
on:
workflow_run:
workflows: ["release"]
types:
- completed
jobs:
aur:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env VERSION
run: |
git fetch --tags
echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
- name: Replace PKGVER, SHA256SUMS_X86_64 in PKGBUILD
run: |
sed -i "s/PKGVER/$(echo ${{ env.VERSION }} | cut -c2-)/g" build/PKGBUILD
wget https://github.com/eeeXun/gtt/releases/download/${{ env.VERSION }}/gtt-linux-amd64.tar.gz
sed -i "s/SHA256SUMS_X86_64/$(sha256sum gtt-linux-amd64.tar.gz | awk '{print $1}')/g" build/PKGBUILD
- name: Publish to the AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.7.2
with:
pkgname: gtt-bin
pkgbuild: build/PKGBUILD
commit_message: Update to ${{ env.VERSION }}
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}