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.
This commit is contained in:
skyler 2026-04-30 17:12:04 +08:00 committed by GitHub
parent ed5d9e88d3
commit a523b97e28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 4 deletions

View File

@ -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."