fixes #42 - Add a startsWith check to publish-new-release workflow#43
Conversation
Verifies that the PR being merged in is from a `release/<version>` branch, skipping the workflow if it is not.
thomaseizinger
left a comment
There was a problem hiding this comment.
Thank you!
Just one minor comment, otherwise this can be merged :)
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.merged == true # only merged pull requests must trigger this job | ||
| # only merged pull requests that begin with 'release/' must trigger this job | ||
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') |
There was a problem hiding this comment.
This will need to handle hotfix/ as well otherwise the code from line 25-31 does not make any sense.
There was a problem hiding this comment.
Sorry about that! Updated the check to look for ('release/' || 'hotfix/')
|
Cool, thank you for the contribution! |
|
Actually, would you mind sending a follow-up PR that adds an entry to the changelog? |
|
Oh yeah, no worries! |
|
Would drafting a 2.1.0 release be appropriate here, updating the changelog in that PR? |
We can draft a new release yes! I typically always fixed up the changelog before but the release PR is a good place too! |
|
We are still depending on a quite old version of the create-pull-request action here so the workflow is broken :( Need to update that and probably enable dependabot in this repo. |
fixes #42 - Add a
startsWithcheck that verifies the PR being merged in is from arelease/<version>branch, skipping the workflow if it is not. This saves us from showing failed workflows for non-release PR merges.Example of this logic skipping non-release PR merges: https://github.com/jsoberg/Loot-Hoard-DnD-Discord-Bot/actions/runs/2988351427
Example of this logic triggering on release PR merges: https://github.com/jsoberg/Loot-Hoard-DnD-Discord-Bot/actions/runs/2988387989