From a523b97e28baeb6945716121bdedcc7564aa5509 Mon Sep 17 00:00:00 2001 From: skyler <77960507+t8y2@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:12:04 +0800 Subject: [PATCH] fix(ci): wait for Release workflow before publishing packages (#31) * chore: bump version to 0.2.1 * fix(ci): wait for Release workflow before publishing packages Changed trigger from release:published to workflow_run on Release completion, so assets are already uploaded when download starts. --- .github/workflows/publish-packages.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index cd22bd6bc..e6e211bde 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -1,8 +1,9 @@ name: Publish Packages on: - release: - types: [published] + workflow_run: + workflows: ["Release"] + types: [completed] permissions: contents: read @@ -14,13 +15,13 @@ env: jobs: publish: name: Publish to Homebrew & Scoop - if: github.event_name == 'release' + if: github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest steps: - name: Extract version from tag id: version run: | - TAG="${{ github.event.release.tag_name }}" + TAG="${{ github.event.workflow_run.head_branch }}" VERSION="${TAG#v}" if [[ ! "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then echo "::error::Tag '${TAG}' does not look like a semver version."