Skip to content

Commit

Permalink
new_version [ci build]
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowwalkersb committed Jun 8, 2024
1 parent 189a89c commit 37bf7df
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/tag-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,33 @@ jobs:
echo "Current version: ${version}"
echo "Requested bump: ${{ env.bump }}"
if [[ "$version" =~ "^v([0-9]+)\.([0-9]+)\.([0-9]+)$" ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
patch="${BASH_REMATCH[3]}"
case "${{ env.bump }}" in
major)
major=$((major + 1))
minor=0
patch=0
;;
minor)
minor=$((minor + 1))
patch=0
;;
patch)
patch=$((patch + 1))
;;
*)
echo "Unknown bump type: ${{ env.bump }}"
exit 1
;;
esac
new_version="v${major}.${minor}.${patch}"
echo ${new_version}
# - name: Checkout eman-feedstock
# uses: actions/checkout@v2
Expand Down

0 comments on commit 37bf7df

Please sign in to comment.