Skip to content

Bump Project Version #1

Bump Project Version

Bump Project Version #1

Workflow file for this run

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