From dd4129e18cdb57215408e419df7a2d8a1b25d2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ko=CC=88ninger?= Date: Fri, 6 Dec 2024 09:12:30 +0100 Subject: [PATCH] fix: workflow action set-next-snapshot-version --- .../workflows/set-next-snapshot-version.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/set-next-snapshot-version.yml diff --git a/.github/workflows/set-next-snapshot-version.yml b/.github/workflows/set-next-snapshot-version.yml new file mode 100644 index 00000000000..7f2843e339f --- /dev/null +++ b/.github/workflows/set-next-snapshot-version.yml @@ -0,0 +1,32 @@ +name: Set to next SNAPSHOT version + +on: + workflow_dispatch: + +jobs: + set-next-snapshot-version: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Set new SNAPSHOT version + run: > + mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" && \ + mvn versions:set -DnextSnapshot && \ + VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive -q) && \ + mvn versions:revert && \ + mvn versions:set-property -Dproperty=revision -DnewVersion="$VERSION" && + mvn versions:commit + + - name: Commit new SNAPSHOT version + uses: stefanzweifel/git-auto-commit-action@v5 + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + with: + commit_message: "chore: update to next SNAPSHOT version" + +