Skip to content

Commit 8622dd2

Browse files
committed
fix(ci): trigger AUR workflow on release publish instead of tag push
This avoids the race condition where the AUR workflow starts before the release is created. Now it only runs after the release is published.
1 parent 8ecdc94 commit 8622dd2

1 file changed

Lines changed: 4 additions & 28 deletions

File tree

.github/workflows/aur-update.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Update AUR Package
22

33
on:
4-
push:
5-
tags:
6-
- "v[0-9]+.[0-9]+.[0-9]+"
4+
release:
5+
types: [published]
76
workflow_dispatch:
87

98
permissions:
@@ -27,7 +26,8 @@ jobs:
2726
git fetch --tags
2827
TAG=$(git tag --sort=-version:refname | head -n1)
2928
else
30-
TAG="${GITHUB_REF_NAME}"
29+
# For release event, use the release tag
30+
TAG="${{ github.event.release.tag_name }}"
3131
fi
3232
3333
# Extract version by removing 'v' prefix
@@ -38,30 +38,6 @@ jobs:
3838
echo "Extracted version: $VERSION"
3939
echo "Tag: $TAG"
4040
41-
- name: Wait for release to be created
42-
run: |
43-
echo "Waiting for GitHub release to be created..."
44-
VERSION="${{ steps.version.outputs.version }}"
45-
TAG="${{ steps.version.outputs.tag }}"
46-
47-
# Wait up to 10 minutes for the release to be created
48-
for i in {1..60}; do
49-
if gh release view "$TAG" &>/dev/null; then
50-
echo "Release $TAG found!"
51-
break
52-
fi
53-
echo "Waiting for release... (attempt $i/60)"
54-
sleep 10
55-
done
56-
57-
# Verify release exists
58-
if ! gh release view "$TAG" &>/dev/null; then
59-
echo "Error: Release $TAG not found after waiting"
60-
exit 1
61-
fi
62-
env:
63-
GH_TOKEN: ${{ github.token }}
64-
6541
- name: Download release assets and calculate checksums
6642
id: checksums
6743
run: |

0 commit comments

Comments
 (0)