Skip to content

chore: fix release job condition#1157

Open
gmaclennan wants to merge 3 commits intomainfrom
chore/release-check-fix
Open

chore: fix release job condition#1157
gmaclennan wants to merge 3 commits intomainfrom
chore/release-check-fix

Conversation

@gmaclennan
Copy link
Copy Markdown
Member

I got the release job condition wrong in my last PR. When this workflow runs as a result of a pull_request close, github.event.inputs.semver is not set (it's only set by workflow_dispatch).

All we can do is avoid creating the PR in the first place (which happens on the workflow_dispatch event) when it's a non-prerelease targeting a non-default branch, but if the PR is somehow created anyway (it shouldn't be) then the action would run regardless of which branch it's targeting when the PR is merged.

I think this is fine, this is just a safety check anyway.

@gmaclennan gmaclennan self-assigned this Oct 21, 2025
@gmaclennan gmaclennan enabled auto-merge (squash) October 21, 2025 23:02
@gmaclennan
Copy link
Copy Markdown
Member Author

I modified the condition again so that the release job still runs on closed PRs (not just merged PRs), because the optic release bot will clean up the draft release that was created if the PR is closed. This avoids leaving draft releases around when releases are abandoned (by closing the PR).

@gmaclennan gmaclennan disabled auto-merge October 27, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants