From 7926e3eaa5bdb138a7ee9cbd92cffe94027e15f1 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:37:47 -0600 Subject: [PATCH] Fix AUR workflow to trigger after release-linux completes - Change trigger from release:published to workflow_run on release-linux - Only run if the triggering workflow succeeded - Increase timeout to 30 minutes for aarch64 build to complete - Extract version from workflow's head branch (the tag) --- .github/workflows/release-aur.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-aur.yml b/.github/workflows/release-aur.yml index 94d6a6e9c..58ce6f37e 100644 --- a/.github/workflows/release-aur.yml +++ b/.github/workflows/release-aur.yml @@ -1,8 +1,10 @@ name: release-aur on: - release: - types: [published] + # Trigger after release-linux completes (it uploads amd64 tarball) + workflow_run: + workflows: ["release-linux"] + types: [completed] workflow_dispatch: inputs: version: @@ -18,7 +20,8 @@ on: jobs: update-aur: runs-on: ubuntu-latest - needs: [] + # Only run if the triggering workflow succeeded (or manual dispatch) + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} steps: - name: Checkout uses: actions/checkout@v4 @@ -26,22 +29,24 @@ jobs: - name: Determine version id: version run: | - if [[ "${{ github.event_name }}" == "release" ]]; then - VERSION="${{ github.event.release.tag_name }}" - VERSION="${VERSION#v}" + if [[ "${{ github.event_name }}" == "workflow_run" ]]; then + # Extract version from the triggering workflow's head branch (tag) + REF="${{ github.event.workflow_run.head_branch }}" + VERSION="${REF#v}" else VERSION="${{ inputs.version }}" fi echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "Detected version: $VERSION" - - name: Wait for release assets - if: github.event_name == 'release' + - name: Wait for all release assets env: VERSION: ${{ steps.version.outputs.version }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo "Waiting for release assets to be available..." - MAX_WAIT=600 + echo "Note: amd64 should be ready (release-linux completed), waiting for aarch64..." + MAX_WAIT=1800 INTERVAL=30 ELAPSED=0 @@ -63,7 +68,7 @@ jobs: done if [ $ELAPSED -ge $MAX_WAIT ]; then - echo "Timeout waiting for release assets" + echo "Timeout waiting for release assets after 30 minutes" exit 1 fi