Skip to content

Commit 8702110

Browse files
fix(ci): adjust to release runs after and only if tests pass
1 parent 97d2acb commit 8702110

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
name: Release
2-
'on':
3-
push:
4-
branches:
5-
- main
2+
3+
on:
64
workflow_run:
7-
workflows:
8-
- test-action
5+
workflows: ["Tests"]
96
types:
107
- completed
118
branches:
129
- main
10+
1311
jobs:
1412
release:
15-
if: >
16-
github.event_name == 'push' || (github.event.workflow_run.conclusion ==
17-
'success' && github.event.workflow_run.event == 'push')
13+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1814
runs-on: ubuntu-latest
1915
steps:
2016
- name: Checkout code
@@ -23,4 +19,4 @@ jobs:
2319
- name: Semantic Release
2420
uses: ahmadnassri/action-semantic-release@v2
2521
env:
26-
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)