Skip to content

Commit 674b064

Browse files
committed
fix(release): only release when tests are ok
1 parent f2f43c1 commit 674b064

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
name: Release
22
"on":
3-
push:
3+
workflow_run:
4+
workflows: ["Tests"]
5+
types:
6+
- completed
47
branches:
58
- main
6-
- next
7-
- beta
8-
- "*.x"
99
permissions:
1010
contents: read # for checkout
1111
jobs:
1212
release:
13+
if: github.event.workflow_run.conclusion == 'success'
1314
permissions:
1415
contents: write # to be able to publish a GitHub release
1516
issues: write # to be able to comment on released issues
@@ -22,6 +23,7 @@ jobs:
2223
- name: Checkout
2324
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2425
with:
26+
ref: ${{ github.event.workflow_run.head_sha }}
2527
persist-credentials: false
2628
- name: Semantic Release
2729
id: semantic

0 commit comments

Comments
 (0)