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:
parent
ed5d9e88d3
commit
a523b97e28
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Reference in New Issue