Bump Project Version #1
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
name: Bump Project Version | |
on: | |
workflow_dispatch: | |
inputs: | |
new_version: | |
description: 'New version to bump to' | |
required: true | |
type: string | |
jobs: | |
bump-version: | |
name: Bump Project Version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4 | |
- name: Bump Project Version | |
run: | | |
mvn versions:set -D newVersion=${{ inputs.new_version }} -D generateBackupPoms=false | |
sed -i 's/"version": "[0-9].[0-9].[0-9]"/"version": "${{ inputs.new_version }}"/g' version.json | |
- name: Commit Version Bump | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git add . | |
if [[ $(git status --porcelain) ]]; then | |
git commit -m "chore: Bump project version to ${{ inputs.new_version }}" | |
fi | |
- name: Push new version | |
run: git push |