Skip to content

Commit 112ccd4

Browse files
committed
Only release after successful build
1 parent 2c42a2e commit 112ccd4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
uses: codecov/codecov-action@v3
5555
with:
5656
name: codecov-build
57-
fail_ci_if_error: true
57+
fail_ci_if_error: false
5858

5959
- name: Upload build artifact
6060
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest'

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: release
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: [ build ]
6+
types: [ completed ]
57
branches: [ main ]
68

79
permissions:
@@ -10,11 +12,13 @@ permissions:
1012
jobs:
1113
release:
1214
runs-on: ubuntu-latest
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1316
steps:
1417
- name: Checkout code
1518
uses: actions/checkout@v3
1619
with:
1720
fetch-depth: 0
21+
ref: ${{ github.event.workflow_run.head_branch }}
1822

1923
- name: Bump version
2024
id: version

0 commit comments

Comments
 (0)