-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix #287: Add draft GHA config for release
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update version with Maven | ||
# - validate that there is no dependency on snapshot | ||
# - update version to non-snapshot | ||
# - commit and tag | ||
# - update version to snapshot | ||
# - push changes | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
update_type: | ||
description: Update type | ||
required: true | ||
type: choice | ||
options: | ||
# `major` not yet supported | ||
- minor | ||
- bugfix | ||
|
||
jobs: | ||
update-version: | ||
name: Update version | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 21 | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Run Maven release:prepare | ||
run: | | ||
echo ${{ inputs.update_type }} | ||
if [ ${{ inputs.update_type }} == "minor" ]; then | ||
mvn -B -U -DdryRun=true release:prepare -DtagNameFormat=@{project.version} -DprojectVersionPolicyId=SemVerVersionPolicy | ||
elif [ ${{ inputs.update_type }} == "bugfix" ]; then | ||
mvn -B -U -DdryRun=true release:prepare -DtagNameFormat=@{project.version} | ||
else | ||
echo "Not supported type: ${{ inputs.update_type }}" | ||
exit 1 | ||
fi |