Skip to content

Commit

Permalink
Update release-prep.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudiaComito authored Nov 4, 2024
1 parent b950992 commit 397a0d1
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@ jobs:
if: contains(github.event.issue.labels.*.name, 'release-prep')
run: |
issue_title="${{ github.event.issue.title }}"
regex="^v(\d+)\.(\d+)\.(\d+)$"
echo "Issue title: $issue_title"
echo "Regular expression: $regex"
if [[ $issue_title =~ $regex ]]; then
echo "major=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
echo "minor=${BASH_REMATCH[2]}" >> $GITHUB_OUTPUT
echo "patch=${BASH_REMATCH[3]}" >> $GITHUB_OUTPUT
else
echo "::error::Issue title does not match the expected format. Please use 'Prepare release vX.Y.Z'."
exit 1
fi
major=$(echo "$issue_title" | cut -d '.' -f 1)
minor=$(echo "$issue_title" | cut -d '.' -f 2)
patch=$(echo "$issue_title" | cut -d '.' -f 3)
echo "major=$major" >> $GITHUB_OUTPUT
echo "minor=$minor" >> $GITHUB_OUTPUT
echo "patch=$patch" >> $GITHUB_OUTPUT
- name: Delete Existing Version Update Branch
run: |
git branch -D workflows/version-update 2> /dev/null
Expand Down

0 comments on commit 397a0d1

Please sign in to comment.