-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating GH Action to automatically bump the version of the project a…
…nd commit the new version to the branch. (#336)
- Loading branch information
1 parent
d42d2db
commit de4ef61
Showing
2 changed files
with
34 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,29 @@ | ||
# .github/workflows/bump-version.yml | ||
name: Bump Version | ||
|
||
# Allows manual trigger with a newVersion input. | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
newVersion: | ||
description: 'New version to set' | ||
required: true | ||
default: '1.0.1' | ||
|
||
jobs: | ||
bump-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Step 1: Check out the repo. | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Use Maven Versions Plugin to update the version across all modules. | ||
- name: Set Maven version | ||
run: mvn versions:set -DnewVersion=${{ github.event.inputs.newVersion }} -DprocessAllModules=true | ||
|
||
# Step 3: Commit the changes using a GitHub Action. | ||
- name: Commit version bump changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: 'Bump version to ${{ github.event.inputs.newVersion }}' |
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