Skip to content

Commit ba2a191

Browse files
author
Mark Pollack
committed
Add post-release version bump to release workflow
1 parent a3e979e commit ba2a191

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
version:
77
description: 'Release version (e.g., 0.9.0)'
88
required: true
9+
next_dev_version:
10+
description: 'Next development version (e.g., 0.10.0-SNAPSHOT). Leave empty to auto-increment minor version.'
11+
required: false
12+
default: ''
13+
type: string
914
skip_tests:
1015
description: 'Skip tests (use for hotfixes only)'
1116
required: false
@@ -72,3 +77,17 @@ jobs:
7277
draft: false
7378
prerelease: ${{ contains(inputs.version, '-') }}
7479
generate_release_notes: true
80+
81+
- name: Bump to next development version
82+
run: |
83+
if [ -n "${{ inputs.next_dev_version }}" ]; then
84+
NEXT_VERSION="${{ inputs.next_dev_version }}"
85+
else
86+
IFS='.' read -r MAJOR MINOR PATCH <<< "${{ inputs.version }}"
87+
NEXT_VERSION="${MAJOR}.$((MINOR + 1)).0-SNAPSHOT"
88+
fi
89+
echo "Next development version: ${NEXT_VERSION}"
90+
./mvnw versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false
91+
git add -A
92+
git commit -m "Bump version to ${NEXT_VERSION}"
93+
git push origin HEAD:main

0 commit comments

Comments
 (0)