Skip to content

Commit 9ae408d

Browse files
authored
feat(ci): set new SNAPSHOT version after release (#2611)
1 parent 0279356 commit 9ae408d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/release-to-maven-central.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
required: true
99
default: '3.0.0'
1010
copyDocsToCurrent:
11+
description: "Should the docs be published at https://docs.spring-boot-admin.com? Otherwise they will be accessible by version number only."
1112
required: true
1213
type: boolean
1314
default: false
@@ -113,3 +114,31 @@ jobs:
113114
${{ steps.changelog.outputs.changelog }}
114115
draft: false
115116
prerelease: ${{ contains(github.event.inputs.releaseversion, '-') }}
117+
118+
set-next-snapshot-version:
119+
needs: publish-github-release
120+
runs-on: ubuntu-latest
121+
122+
permissions:
123+
contents: write
124+
125+
steps:
126+
- uses: actions/checkout@v3
127+
128+
- name: Set new SNAPSHOT version
129+
run: >
130+
mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" && \
131+
mvn versions:set -DnextSnapshot && \
132+
VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive -q) && \
133+
mvn versions:revert && \
134+
mvn versions:set-property -Dproperty=revision -DnewVersion="$VERSION" &&
135+
mvn versions:commit
136+
137+
- name: Commit new SNAPSHOT version
138+
uses: stefanzweifel/git-auto-commit-action@v4
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
with:
142+
commit_message: "chore: update to next SNAPSHOT version"
143+
144+

0 commit comments

Comments
 (0)