-
-
Notifications
You must be signed in to change notification settings - Fork 245
52 lines (45 loc) · 1.73 KB
/
Copy pathaur.yml
File metadata and controls
52 lines (45 loc) · 1.73 KB
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
name: Publish to AUR
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Release version (without v prefix, e.g. 0.9.14)'
required: true
jobs:
aur-publish:
if: ${{ github.event_name == 'workflow_dispatch' || !github.event.release.prerelease }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Get Release Version
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
fi
- name: Download .deb Artifact
run: |
wget "https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}/tabularis_${{ steps.version.outputs.version }}_amd64.deb" -O app.deb
- name: Calculate SHA256
id: shasum
run: |
echo "sha256=$(sha256sum app.deb | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Update PKGBUILD
run: |
cd aur
sed -i "s/^pkgver=.*/pkgver=${{ steps.version.outputs.version }}/" PKGBUILD
sed -i "s/^sha256sums=.*/sha256sums=('${{ steps.shasum.outputs.sha256 }}')/" PKGBUILD
- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v4.1.2
with:
pkgname: tabularis-bin
pkgbuild: ./aur/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update to v${{ steps.version.outputs.version }}"
force_push: true