From 18d24afa8f9f297112b44d48155955b0cba4a434 Mon Sep 17 00:00:00 2001 From: Torsten Friebe Date: Tue, 21 Nov 2023 18:42:08 +0100 Subject: [PATCH] #982 add GH action to manual release --- .github/workflows/manual-release.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/manual-release.yml diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml new file mode 100644 index 0000000..11605fc --- /dev/null +++ b/.github/workflows/manual-release.yml @@ -0,0 +1,33 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Manual trigger Maven release build + +on: + workflow_dispatch: + inputs: + release_version: + description: 'Release version' + required: true + default: '1.0.0' + next_version: + description: 'Next SNAPSHOT version' + required: true + default: '1.0.1-SNAPSHOT' + +jobs: + deploy: + if: github.ref_name == 'main' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Prepare and release + run: mvn -Dresume=false -DreleaseVersion=${github.event.inputs.release_version} -DdevelopmentVersion=${github.event.inputs.next_version} -DdeployAtEnd=true -Dgoals=deploy release:prepare release:perform + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file