From 7cf5affb66b50b248ae678e3faba6ea0d5a1d19e Mon Sep 17 00:00:00 2001 From: Adam Plowman Date: Sun, 6 Apr 2025 13:01:26 +0100 Subject: [PATCH] Try to fix release triggering on non-merged PRs According to the example here https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges we should be explicit with the `merged` check: `github.event.pull_request.merged == true` --- .github/workflows/release-impl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index 30235ca..a512aee 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -157,7 +157,7 @@ on: jobs: bump-version: # skip if trying to re-run; PR is closed without merging; '[skip release]' is in the PR title; or if merging any branch other than pre_release_branch into release_branch - if: inputs.gh-run-attempt == '1' && inputs.pr-merged && !contains(inputs.pr-title, '[skip release]') && (inputs.pr-base-ref == inputs.pre_release_branch || (inputs.pr-base-ref == inputs.release_branch && inputs.pr-head-ref == inputs.pre_release_branch)) + if: inputs.gh-run-attempt == '1' && inputs.pr-merged == true && !contains(inputs.pr-title, '[skip release]') && (inputs.pr-base-ref == inputs.pre_release_branch || (inputs.pr-base-ref == inputs.release_branch && inputs.pr-head-ref == inputs.pre_release_branch)) runs-on: ubuntu-latest outputs: new_tag: ${{ steps.new_tag.outputs.tag }}