Skip to content

Commit

Permalink
chore(workflows): add option to release the current snapshot version
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed Jul 16, 2024
1 parent e5a2292 commit dd74d8a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/update-registry-library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
inputs:
version-type:
type: choice
description: Type of version increment
description: Type of version increment. 'none' will release the current -SNAPSHOT version without increment.
required: true
options:
- 'major'
- 'minor'
- 'patch'
- 'none'
is-release-version:
type: boolean
required: true
Expand Down Expand Up @@ -51,6 +52,12 @@ jobs:
patch=0
elif [ "$TYPE" == "patch" ]; then
patch=$((patch + 1))
elif [ "$TYPE" == "none" ]; then
if [ $IS_RELEASE_VERSION = 'true' ]; then
echo "Invalid increment type. Type 'none' is only supported in combination with 'is-release-version=true'."
exit 1
fi
echo "Skipping version increment, only remove -SNAPSHOT"
else
echo "Invalid increment type. Use 'major', 'minor', or 'patch'."
exit 1
Expand All @@ -59,6 +66,10 @@ jobs:
if [ $IS_RELEASE_VERSION = 'true' ]; then
new_version="${major}.${minor}.${patch}"
fi
if [ $new_version == $CURRENT_VERSION ]; then
echo "New version is equal to current version."
exit 1
fi
echo NEXT_VERSION="$new_version" >> $GITHUB_ENV
- name: Update irs-registry-client version
Expand Down

0 comments on commit dd74d8a

Please sign in to comment.