Repository navigation
feat: add hk-autorelease action for automated releases - #1598
Conversation
… superpowers artifacts
|
I'll perform active testing directly on dummy repositories but feel free to start reviewing. Feedback is appreciated. |
jorgepiloto
left a comment
There was a problem hiding this comment.
Just left a minor comment about using ast in favor of regex module. I think its safer but may increase the complexity of the code.
|
Testing summary in ansys/dummy-autorelease-repo |
|
The documentation for this pull request will be available at https://actions.docs.ansys.com/pull/1598. Please allow some time for the documentation to be deployed. |
|
@ansys/pyansys-core ... gentle reminder. Can I get a review on this? |
jorgepiloto
left a comment
There was a problem hiding this comment.
Thanks a lot for adding this. It minimizes human error. Approving on my side.
|
Merging after #1623 |
|
This PR has been closed. Documentation for this pull request will shortly be removed from its former deployment address. |
Context
ansys-api-discoveryandansys-api-geometryeach carry their own copies of two near-identical bash scripts (major_minor_release.sh,patch_release.sh) plus anautorelease.ymlworkflow that bump a version, create/merge release branches, and push release tags. The two copies had already drifted: one handles merge conflicts on the version file safely, the other doesn't.This PR ports that logic into a single reusable
hk-autoreleaseaction so any repo can opt in instead of copy-pasting scripts, and fixes the conflict-handling drift along the way (adopting the safer behavior everywhere).What it does
Given a
release-type(patch/minor/major), the action:VERSIONfile,pyproject.toml,setup.py, or a Python module (version-sourceinput),release/<major>.<minor>branches and pushesvX.Y.Ztags,Like other
hk-*actions, this one must live in its own workflow file triggered only byworkflow_dispatch(it pushes commits/branches/tags directly). See the docs section and example added in this PR.