From b878ccfefeab06ecb1d2b3981ad9a88d589c0d57 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 4 Dec 2024 12:20:00 -0800 Subject: [PATCH] add rc validation --- .github/workflows/python-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index c647bfaac6..df281892a0 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -68,7 +68,11 @@ jobs: exit 1 fi - # RC is already validated as a number via workflow_dispatch inputs + # Validate rc (e.g., 1) + if [[ ! "$RC" =~ ^[0-9]+$ ]]; then + echo "Error: rc ($RC) must be in the format: " + exit 1 + fi fi # Export variables for future steps