Skip to content

Commit 6f6953e

Browse files
authored
add ( CI for AUR pkg manager deployment )
1 parent da33c93 commit 6f6953e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/aur_release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release AUR
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
environment: aur-deployment
12+
container: archlinux:latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup SSH
19+
run: |
20+
mkdir -p ~/.ssh
21+
echo "${{ secrets.AUR_SSH_KEY }}" > ~/.ssh/id_ed25519
22+
chmod 600 ~/.ssh/id_ed25519
23+
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
24+
25+
- name: Clone AUR repo
26+
run: git clone ssh://aur@aur.archlinux.org/имя_пакета.git aur-repo
27+
28+
- name: Update PKGBUILD
29+
run: |
30+
cd aur-repo
31+
VERSION=${GITHUB_REF##*/}
32+
VERSION=${VERSION#v}
33+
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
34+
makepkg --printsrcinfo > .SRCINFO
35+
git config user.name "github-bot"
36+
git config user.email "bot@example.com"
37+
git add PKGBUILD .SRCINFO
38+
git commit -m "Update to ${VERSION}"
39+
git push

0 commit comments

Comments
 (0)