Skip to content

Commit b2da02c

Browse files
authored
fix(cd): use single if on main step (#494)
1 parent 1988c19 commit b2da02c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
publish-dry-run:
2626
name: "Runs cargo publish --dry-run"
2727
runs-on: ubuntu-latest
28-
if: ${{ github.event.pull_request.merged }}
28+
if: ${{ always() && (github.event.pull_request.merged || github.event_name == 'workflow_dispatch') }}
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v6
@@ -58,7 +58,7 @@ jobs:
5858
5959
build-binaries:
6060
name: Build binaries
61-
if: ${{ (github.event.pull_request.merged || github.event_name == 'workflow_dispatch') && needs.publish-dry-run.result == 'success' }}
61+
needs: publish-dry-run
6262
strategy:
6363
matrix:
6464
include:
@@ -146,7 +146,6 @@ jobs:
146146
name: Create Release
147147
needs: build-binaries
148148
runs-on: ubuntu-latest
149-
if: ${{ (github.event.pull_request.merged || github.event_name == 'workflow_dispatch') && needs.build-binaries.result == 'success' }}
150149
steps:
151150
- name: Checkout
152151
uses: actions/checkout@v6

0 commit comments

Comments
 (0)