Skip to content

Commit e53994e

Browse files
committed
feat: update release workflow to trigger on CI completion and adjust conditions for semantic-release
1 parent ebc4274 commit e53994e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: Release
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows:
6+
- CI
7+
types:
8+
- completed
59
branches:
610
- main
711
pull_request:
@@ -33,7 +37,7 @@ jobs:
3337

3438
semantic-release:
3539
name: semantic-release
36-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
40+
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
3741
permissions:
3842
contents: write
3943
runs-on: ubuntu-latest
@@ -42,6 +46,7 @@ jobs:
4246
uses: actions/checkout@v4
4347
with:
4448
fetch-depth: 0
49+
ref: ${{ github.event.workflow_run.head_sha }}
4550

4651
- name: Setup uv
4752
uses: astral-sh/setup-uv@v5

0 commit comments

Comments
 (0)