File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 2727 with :
2828 fetch-depth : 0
2929
30- - name : Validate versions and tag
30+ - name : Validate versions and create tag
3131 run : |
3232 if ! echo "$CODE_EDITOR_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$'; then
3333 echo "Code Editor version $CODE_EDITOR_VERSION does not follow semantic version pattern (x.y.z) or x.y.z-rc.N. Skipping release."
@@ -36,10 +36,13 @@ jobs:
3636 echo "Code Editor version $CODE_EDITOR_VERSION is valid"
3737 echo "SageMaker Code Editor version $SAGEMAKER_VERSION will be mapped"
3838
39- # Verify tag exists and matches the version
40- if ! git rev-parse "$CODE_EDITOR_VERSION" >/dev/null 2>&1; then
41- echo "Error: Tag $CODE_EDITOR_VERSION does not exist. Create it first with: git tag $CODE_EDITOR_VERSION. Skipping release."
42- exit 1
39+ # Check if tag already exists
40+ if git rev-parse "$CODE_EDITOR_VERSION" >/dev/null 2>&1; then
41+ echo "Tag $CODE_EDITOR_VERSION already exists"
42+ else
43+ echo "Creating tag $CODE_EDITOR_VERSION on current commit"
44+ git tag "$CODE_EDITOR_VERSION"
45+ git push origin "$CODE_EDITOR_VERSION"
4346 fi
4447
4548 # Get commit SHA from tag and export it
You can’t perform that action at this time.
0 commit comments