Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tag-recreate-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ jobs:

# Validate semantic versioning format (semver 2.0)
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if the RC is an LTS release -- e.g. 1.3.4rc0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ⚠️ Would pass semver, attempt LTS creation

I can add extra checks and handling for the workflow_dispatch scenarios if deemed necessary/desirable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right -- no such tag for any RC. Thanks!

exit 0
fi

echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
Expand Down