Repository navigation
ci: add workflow to automate release PR creation - #409
Conversation
9214f0c to
2d70824
Compare
| description: 'Version number for the release (e.g., 1.15.0)' | ||
| required: true | ||
| type: string |
There was a problem hiding this comment.
Would be better as an input of "major" "minor" or "patch", as that removes even more thinking from the equation. See
deadbot/.github/workflows/increment-version-dev.yaml
Lines 27 to 28 in e410ddf
There was a problem hiding this comment.
(might need to modify or make a copy of the function to allow just getting the next version number, rather than actually bumping it)
There was a problem hiding this comment.
Is what I have now more what you were looking for?
There was a problem hiding this comment.
Yeah looks great, just one comment to deal with
f625a66 to
12f43d6
Compare
12f43d6 to
c0d8e79
Compare
|
Also, I cant figure out why the lint check is failing. Edit: Figured it out. pre-commit uses a pinned ruff version (0.6.2) while the CI uses the latest version. And the latest version of ruff came out yesterday and has breaking changes. |
| run: | | ||
| git fetch origin master | ||
| # Extract the clean MAJOR.MINOR.PATCH from master, ignoring develop's beta suffix | ||
| MASTER_VERSION=$(git show origin/master:pyproject.toml | grep -Po '(?<=version = ")[0-9]+\.[0-9]+\.[0-9]+') |
There was a problem hiding this comment.
Is this necessary if the script already reads the version for you?
There was a problem hiding this comment.
Yes, it's necessary. The workflow checks out develop, which has a beta-suffixed version (e.g., 1.16.0-beta.4). The script's read_version() reads from the current pyproject.toml, so without --base the bump math would be calculated against that beta version rather than the last stable release on master. Fetching master and passing it via --base is exactly why that flag was added.
There was a problem hiding this comment.
The script is designed to handle beta versions. Eg. 1.16.0-beta.4 minor release would return 1.17.0
There was a problem hiding this comment.
Ah, my mistake. I misunderstood the script on that part.
Ah interesting, I'll sort that out in a separate PR |
hassayag
left a comment
There was a problem hiding this comment.
Noice, will test on the next release 🤞
Adds a
create-release-pr.yamlworkflow that can be triggered manually viaworkflow_dispatchwith a version bump type input (patch/minor/major). It checks out the develop branch, computes the next version, creates arelease/vX.X.Xbranch, pushes it, and opens a pull request againstmaster.