-
-
Notifications
You must be signed in to change notification settings - Fork 150
68 lines (61 loc) · 2.53 KB
/
publish-aur.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Publish to AUR
on:
workflow_dispatch:
jobs:
publish-aur:
runs-on: ubuntu-latest
env:
PACKAGE_NAME: mobsh-bin
VERSION: v5.2.0 # Set this to the tag name of the release
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download checksum file
run: |
wget -O checksum.txt https://github.com/remotemobprogramming/mob/releases/download/${{ env.VERSION }}/mob_${{ env.VERSION }}_linux_amd64_sha256_checksum.txt
SHA_LINUX=$(cat checksum.txt)
echo "SHA_LINUX=$SHA_LINUX" >> $GITHUB_ENV
- name: Set VERSION_NUMBER
run: |
PKGVER="${{ env.VERSION }}"
PKGVER="${PKGVER#v}" # Strip 'v' at the start
echo "PKGVER=$PKGVER" >> $GITHUB_ENV
- name: Create PKGBUILD
run: |
mkdir -p ./aur/${{ env.PACKAGE_NAME }}/
cat > ./aur/${{ env.PACKAGE_NAME }}/PKGBUILD << 'EOF'
pkgname=${{ env.PACKAGE_NAME }}
pkgver=${{ env.PKGVER }}
pkgrel=1
pkgdesc="Fast git handover with mob"
arch=('x86_64')
url="https://github.com/${{ github.repository }}"
license=('MIT')
depends=("git")
optdepends=('espeak-ng-espeak: Multi-lingual software speech synthesizer'
'mbrola-voices-us1: An American English female voice for the MBROLA synthesizer')
provides=('mobsh')
conflicts=('mobsh' 'mob')
source_x86_64=("https://github.com/remotemobprogramming/mob/releases/download/${{ env.VERSION }}/mob_${{ env.VERSION }}_linux_amd64.tar.gz")
sha256sums_x86_64=("${{ env.SHA_LINUX }}")
package() {
install -D -m644 "LICENSE" "\$pkgdir/usr/share/licenses/\$pkgname/LICENSE"
install -D -m755 mob_linux_amd64 "\$pkgdir/usr/bin/mob"
}
EOF
- name: Store PKGBUILD as an artifact
uses: actions/upload-artifact@v4
with:
name: PKGBUILD
path: ./aur/${{ env.PACKAGE_NAME }}/PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: ${{ env.PACKAGE_NAME }}
pkgver: ${{ env.PKGVER }}
pkgbuild: ./aur/${{ env.PACKAGE_NAME }}/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update AUR package for ${{ env.VERSION }}"
ssh_keyscan_types: rsa,ecdsa,ed25519