Gracefully handle non-LTS releases#4034
Conversation
Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>
|
| if ! echo "$RELEASE_TAG" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$'; then | ||
| echo "Error: Release tag '$RELEASE_TAG' does not match semantic versioning format (X.Y.Z[-prerelease][+build])" | ||
| exit 1 | ||
| echo "Warning: Release tag '$RELEASE_TAG' does not match semantic versioning format - skipping" |
There was a problem hiding this comment.
Will this work if the RC is an LTS release -- e.g. 1.3.4rc0?
There was a problem hiding this comment.
It looks like this will work fine (skip LTS release creation) for rc releases due to semver validation failing. I think this is desirable since we do not want an LTS tag to point to a rc, but rather point to the final release for that version.
When running the workflow manually (i.e.: need to manually re-create a release image) it could attempt to create the release if semver checks passed, but that would require using the hyphen we are not using (had to ask for the help of AI to parse all the regexp scenarios again, but I am fairly confident the output is correct).
| Trigger | RC Format | Result |
|---|---|---|
| workflow_run | 1.3.4rc0 | ✅ Skipped gracefully (RC check) |
| workflow_dispatch | 1.3.4rc0 | ❌ Fails at semver validation |
| workflow_dispatch | 1.3.4-rc0 |
I can add extra checks and handling for the workflow_dispatch scenarios if deemed necessary/desirable.
There was a problem hiding this comment.
You are right -- no such tag for any RC. Thanks!



Resolves #4029
The issue was that the step determining whether the current branch is an LTS was hard-exiting instead of letting the next step set the skip flag and skip the rest of the steps correctly.