From 246d8d041d35da480f718aae449c681c5c854e39 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Tue, 24 Feb 2026 17:51:15 +0800 Subject: Add aurpublish to AUR publishing workflow --- .github/workflows/publish-aur.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/publish-aur.yml b/.github/workflows/publish-aur.yml index 77f4382..7eb3eb4 100644 --- a/.github/workflows/publish-aur.yml +++ b/.github/workflows/publish-aur.yml @@ -19,8 +19,8 @@ image: archlinux:latest steps: - name: Install dependencies - run: pacman -Sy --noconfirm git openssh base-devel - + run: pacman -Sy --noconfirm git openssh base-devel aurpublish + - name: Set up SSH for AUR run: | mkdir -p ~/.ssh @@ -35,13 +35,9 @@ git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Clone AUR repo - run: | - GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=~/.ssh/known_hosts" git clone ssh://aur@aur.archlinux.org/soon.git aur-push - - name: Update PKGBUILD and .SRCINFO run: | - cd aur-push + cd $GITHUB_WORKSPACE if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.tag }}" ]; then TAG="${{ github.event.inputs.tag }}" else @@ -50,6 +46,8 @@ VERSION="${TAG#v}" sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD makepkg --printsrcinfo > .SRCINFO - git add PKGBUILD .SRCINFO - git commit -m "release: $VERSION" || echo "Nothing to commit" - git push + + - name: Publish to AUR with aurpublish + run: | + cd $GITHUB_WORKSPACE + GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=~/.ssh/known_hosts" aurpublish soon -- cgit v1.2.3-70-g09d2