Skip to content

Commit fd0849e

Browse files
committed
test(ci): make release depend on tests
1 parent 2bd64c5 commit fd0849e

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 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
@@ -20,7 +21,11 @@ jobs:
2021
steps:
2122
- name: Checkout
2223
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
24+
with:
25+
ref: ${{ github.event.workflow_run.head_sha }}
26+
persist-credentials: false
2327
- name: Semantic Release
28+
id: semantic
2429
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
2530
with:
2631
tag_format: ${version}

0 commit comments

Comments
 (0)