Skip to content

Commit

Permalink
fix: workflow action set-next-snapshot-version
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Dec 6, 2024
1 parent 6c0b879 commit dd4129e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/set-next-snapshot-version.yml
Original file line number Diff line number Diff line change
@@ -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"


0 comments on commit dd4129e

Please sign in to comment.