File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,16 +56,18 @@ jobs:
5656 echo "Current branch: $BRANCH"
5757 echo "Release type: $TYPE"
5858
59- # Branch validation
60- if [ "$TYPE" == "patch" ] || [ "$TYPE" == "retag" ]; then
61- if [[ ! $BRANCH =~ ^release/[0-9]+\.[0-9]+\._$ ]]; then
62- echo "::error::${TYPE^} can only be performed from 'release/*' branches (format: release/X.Y._)"
63- exit 1
64- fi
65- else
66- if [ "$BRANCH" != "main" ]; then
67- echo "::error::Major or minor releases can only be performed from 'main' branch"
68- exit 1
59+ # Branch validation (skipped for dry-run to allow testing from any branch)
60+ if [ "${{ inputs.dry_run }}" != "true" ]; then
61+ if [ "$TYPE" == "patch" ] || [ "$TYPE" == "retag" ]; then
62+ if [[ ! $BRANCH =~ ^release/[0-9]+\.[0-9]+\._$ ]]; then
63+ echo "::error::${TYPE^} can only be performed from 'release/*' branches (format: release/X.Y._)"
64+ exit 1
65+ fi
66+ else
67+ if [ "$BRANCH" != "main" ]; then
68+ echo "::error::Major or minor releases can only be performed from 'main' branch"
69+ exit 1
70+ fi
6971 fi
7072 fi
7173
You can’t perform that action at this time.
0 commit comments