From 8f38a248e07d92fcdc207faad9353a20737c1ad7 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Tue, 24 Feb 2026 15:22:51 +0800 Subject: Modify publish workflow to set pkgver from tag Update PKGBUILD version dynamically based on tag. --- .github/workflows/publish-aur.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-aur.yml b/.github/workflows/publish-aur.yml index f9e43cd..f6e53f6 100644 --- a/.github/workflows/publish-aur.yml +++ b/.github/workflows/publish-aur.yml @@ -35,8 +35,13 @@ jobs: run: | git clone ssh://aur@aur.archlinux.org/soon.git aur-repo cd aur-repo - cp ../PKGBUILD . + + TAG=${GITHUB_REF##*/} + VERSION=${TAG#v} + sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD + makepkg --printsrcinfo > .SRCINFO + git add PKGBUILD .SRCINFO if git diff --cached --quiet; then -- cgit v1.2.3-70-g09d2