Skip to content

Commit d7532cf

Browse files
committed
publish aur action
1 parent 64d71bb commit d7532cf

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/publish-aur.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Publish to AUR
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish-aur:
8+
runs-on: ubuntu-latest
9+
env:
10+
PACKAGE_NAME: mobsh-bin
11+
VERSION: v5.0.0 # Set this to the tag name of the release
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Download checksum file
17+
run: |
18+
wget -O checksum.txt https://github.com/remotemobprogramming/mob/releases/download/${{ env.VERSION }}/mob_${{ env.VERSION }}_linux_amd64_sha256_checksum.txt
19+
SHA_LINUX=$(cat checksum.txt)
20+
echo "SHA_LINUX=$SHA_LINUX" >> $GITHUB_ENV
21+
22+
- name: Create PKGBUILD
23+
run: |
24+
mkdir -p ./aur/${{ env.PACKAGE_NAME }}/
25+
# Strip the leading "v" from the version
26+
VERSION_NUMBER="${{ env.VERSION }}".replace(/^v/, '')
27+
cat > ./aur/${{ env.PACKAGE_NAME }}/PKGBUILD << EOF
28+
pkgname=${{ env.PACKAGE_NAME }}
29+
pkgver=$VERSION_NUMBER
30+
pkgrel=1
31+
pkgdesc="Fast git handover with mob"
32+
arch=('x86_64')
33+
url="https://github.com/${{ github.repository }}"
34+
license=('MIT')
35+
depends=("git")
36+
optdepends=('espeak-ng-espeak: Multi-lingual software speech synthesizer'
37+
'mbrola-voices-us1: An American English female voice for the MBROLA synthesizer')
38+
provides=('mobsh')
39+
conflicts=('mobsh' 'mob')
40+
source_x86_64=("https://github.com/remotemobprogramming/mob/releases/download/${{ env.VERSION }}/mob_${{ env.VERSION }}_linux_amd64.tar.gz")
41+
sha256sums_x86_64=("${{ env.SHA_LINUX }}")
42+
package() {
43+
install -D -m644 "LICENSE" "\$pkgdir/usr/share/licenses/\$pkgname/LICENSE"
44+
install -D -m755 mob_linux_amd64 "\$pkgdir/usr/bin/mob"
45+
}
46+
EOF
47+
48+
- name: Store PKGBUILD as an artifact
49+
uses: actions/upload-artifact@v2
50+
with:
51+
name: PKGBUILD
52+
path: ./aur/${{ env.PACKAGE_NAME }}/PKGBUILD
53+
54+
- name: Publish AUR package
55+
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
56+
with:
57+
pkgname: ${{ env.PACKAGE_NAME }}
58+
pkgbuild: ./aur/${{ env.PACKAGE_NAME }}/PKGBUILD
59+
commit_username: ${{ secrets.AUR_USERNAME }}
60+
commit_email: ${{ secrets.AUR_EMAIL }}
61+
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
62+
commit_message: "Update AUR package for ${{ env.VERSION }}"
63+
ssh_keyscan_types: rsa,ecdsa,ed25519

0 commit comments

Comments
 (0)