Allow alpha hotfix versions in R2 releases (#35595)

## Why

The Rust release workflow accepts alpha versions with a second numeric suffix,
such as `1.2.3-alpha.4.1`, but the R2 publisher rejects them as invalid.

## What changed

- Allow up to two numeric suffix components for alpha versions in
  `publish_r2_release.py`.
- Document that its version pattern must remain aligned with release tag
  validation in `rust-release.yml`.

GitOrigin-RevId: 8df68ce4f4d3e652367f7394a642827f21979d70
This commit is contained in:
zsol-openai
2026-07-27 10:54:58 +00:00
committed by copyberry
parent 8a1c941439
commit 3d519bf63a
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -40,6 +40,8 @@ jobs:
|| { echo "❌ Not a tag ref"; exit 1; }
# Release tags must match the version in Cargo.toml.
# Keep this pattern in sync with VERSION_RE in
# .github/scripts/publish_r2_release.py.
[[ "${GITHUB_REF_NAME}" =~ ^rust-v[0-9]+\.[0-9]+\.[0-9]+(-(alpha(\.[0-9]+){0,2}|beta(\.[0-9]+)?))?$ ]] \
|| { echo "❌ Tag '${GITHUB_REF_NAME}' doesn't match expected format"; exit 1; }