Skip to content

Commit b43f6ad

Browse files
committed
Prevent release workflow on unmerged PRs
1 parent 1153948 commit b43f6ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: "OpenTermsArchive/engine/.github/workflows/test.yml@main"
1515
release:
1616
needs: [ changelog, test ]
17-
if: needs.changelog.outputs.release-type != 'no-release'
17+
if: github.event.pull_request.merged == true && needs.changelog.outputs.release-type != 'no-release'
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
@@ -73,7 +73,7 @@ jobs:
7373
client-payload: '{"version": "v${{ steps.release-changelog.outputs.version }}"}'
7474

7575
clean_changelog:
76-
if: needs.changelog.outputs.release-type == 'no-release'
76+
if: github.event.pull_request.merged == true && needs.changelog.outputs.release-type == 'no-release'
7777
needs: [ changelog ]
7878
runs-on: ubuntu-latest
7979
steps:

0 commit comments

Comments
 (0)