mirror of https://github.com/domcyrus/rustnet.git
fix(ci): trigger AUR workflow on release publish instead of tag push
Rust / build (push) Has been cancelled
Details
Rust / build (push) Has been cancelled
Details
This avoids the race condition where the AUR workflow starts before the release is created. Now it only runs after the release is published.
This commit is contained in:
parent
8ecdc94108
commit
8622dd2d87
|
|
@ -1,9 +1,8 @@
|
|||
name: Update AUR Package
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
|
|
@ -27,7 +26,8 @@ jobs:
|
|||
git fetch --tags
|
||||
TAG=$(git tag --sort=-version:refname | head -n1)
|
||||
else
|
||||
TAG="${GITHUB_REF_NAME}"
|
||||
# For release event, use the release tag
|
||||
TAG="${{ github.event.release.tag_name }}"
|
||||
fi
|
||||
|
||||
# Extract version by removing 'v' prefix
|
||||
|
|
@ -38,30 +38,6 @@ jobs:
|
|||
echo "Extracted version: $VERSION"
|
||||
echo "Tag: $TAG"
|
||||
|
||||
- name: Wait for release to be created
|
||||
run: |
|
||||
echo "Waiting for GitHub release to be created..."
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
TAG="${{ steps.version.outputs.tag }}"
|
||||
|
||||
# Wait up to 10 minutes for the release to be created
|
||||
for i in {1..60}; do
|
||||
if gh release view "$TAG" &>/dev/null; then
|
||||
echo "Release $TAG found!"
|
||||
break
|
||||
fi
|
||||
echo "Waiting for release... (attempt $i/60)"
|
||||
sleep 10
|
||||
done
|
||||
|
||||
# Verify release exists
|
||||
if ! gh release view "$TAG" &>/dev/null; then
|
||||
echo "Error: Release $TAG not found after waiting"
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Download release assets and calculate checksums
|
||||
id: checksums
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Reference in New Issue