Skip to content

Commit

Permalink
Validate current version
Browse files Browse the repository at this point in the history
  • Loading branch information
yvasyliev committed Nov 14, 2023
1 parent ec28fbd commit 4837d57
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/release-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,15 @@ jobs:
CURRENT_VERSION: ${{ steps.get-current-version.outputs.current-version }}
run: |
echo "current-version=$CURRENT_VERSION"
echo "Current version is \`$CURRENT_VERSION\`" >> $GITHUB_STEP_SUMMARY
echo "Current version is \`$CURRENT_VERSION\`" >> $GITHUB_STEP_SUMMARY
- name: Validate current version
if: github.event.inputs.release_type != 'provided'
env:
# CURRENT_VERSION: ${{ steps.get-current-version.outputs.current-version }}
CURRENT_VERSION: 1.2.3a
run: |
if [[ ! $CURRENT_VERSION =~ ^([[:digit:]]+\.){2}[[:digit:]]+([\.-].+)?$ ]]
then
echo "::error::Unexpected artifact version found in pom.xml: $CURRENT_VERSION. Expected format: x.y.z*"
exit 1
fi

0 comments on commit 4837d57

Please sign in to comment.