You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You must already have 2 tags in your repository (1 previous tag + the current latest tag triggering the job). The job will exit with an error if it can't find the previous tag!
My question is how to prevent the workflow failing caused when no previous tag exists. I think that this should be documented too, at least with some code snippers. Because on a brand new project, this is going to 100% fail for obvious reasons.
Of course one can:
Create the first tag and push it
Manually create a the first release based on the tag above
What if when it's the first tag (there is no previous tag) it considers the whole history to build a change log? Instead of using a previous tag, it could look at the first commit and build the changelog from it in this initial release.
I agree. Also, this is a case where it could and I think should fail silently (if no other solution is possible). An empty changelog is not a big deal, but a failed first release is.
If we are to handle it ourselves (through conditional execution of the steps, default, etc.) this would make our workflow more complex but only to handle the first release... it doesn't make practical sense.
I've read the note in the documentation:
My question is how to prevent the workflow failing caused when no previous tag exists. I think that this should be documented too, at least with some code snippers. Because on a brand new project, this is going to 100% fail for obvious reasons.
Of course one can:
... but this is very incovenient.
The text was updated successfully, but these errors were encountered: