The idea is, to avoid the recursive call, there are two choices:
run the action nonetheless and handle the skip inside its logic
Have a more declarative model in which users can filter out, and use your pipeline as a reference
I tend more with the second one, as users can avoid wasting ressources with an additional step DX wise
Changes
I added a default-branch param to the CLI. This is due to the fact that extracting the default branch of a repo inside a GitHub Job context is a bit tricky, spent a few hours trying to be smart today, with no luck. Instead of being falsely too smart, I prefer to make it declarative. It defaults to main when not set, but any repo with a default branch different from main shall set this key
Also, another design choice made is to directly push on main branch after the merge commit instead of opening a new PR and skip the merge commits from TinySemVer's logic.
A bit of docs was added but could extend it
Proof of work:
P.S: Feel free to test on my fork, you should have write rights.
The recursive is being handled declaratively directly inside your action file, I like it better as it totally skips the job instead of being a silent skip. Users will have to copy it but it is not hard
Fixes #1
Implements the GitHub Action. Testing on the side, on my fork: https://github.com/grouville/tinysemver
The idea is, to avoid the recursive call, there are two choices:
I tend more with the second one, as users can avoid wasting ressources with an additional step DX wise
Changes
I added a
default-branch
param to the CLI. This is due to the fact that extracting the default branch of a repo inside a GitHub Job context is a bit tricky, spent a few hours trying to be smart today, with no luck. Instead of being falsely too smart, I prefer to make it declarative. It defaults tomain
when not set, but any repo with a default branch different frommain
shall set this keyAlso, another design choice made is to directly push on main branch after the merge commit instead of opening a new PR and skip the merge commits from TinySemVer's logic.
A bit of docs was added but could extend it
Proof of work:
P.S: Feel free to test on my fork, you should have write rights.
The recursive is being handled declaratively directly inside your action file, I like it better as it totally skips the job instead of being a silent skip. Users will have to copy it but it is not hard