Skip to content

Commit 4929386

Browse files
committed
fix brew
1 parent 72e8b43 commit 4929386

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/brew.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ name: Homebrew Release
22

33
on:
44
workflow_dispatch:
5-
release:
6-
types: [published]
5+
workflow_run:
6+
workflows: ["Release"]
7+
types:
8+
- completed
79

810
jobs:
911
release:
12+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v4
@@ -16,10 +19,10 @@ jobs:
1619
- name: Get version
1720
id: get_version
1821
run: |
19-
if [ "${{ github.event_name }}" = "release" ]; then
20-
echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
21-
else
22+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
2223
echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
24+
else
25+
echo "VERSION=${{ github.event.workflow_run.head_commit.id }}" >> $GITHUB_OUTPUT
2326
fi
2427
2528
- name: Download Release Assets

0 commit comments

Comments
 (0)