From f3e3123476359dec47265735dba65513dbfd07c1 Mon Sep 17 00:00:00 2001 From: Torsten Friebe Date: Tue, 21 Nov 2023 17:56:43 +0100 Subject: [PATCH] #928 prepare deploy to GH repository --- .github/workflows/maven.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3fa26f4..536bb8b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,9 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Set up JDK 11 @@ -28,4 +26,19 @@ jobs: uses: actions/upload-artifact@v3 with: name: sep3-parser - path: target/sep3-parser-*-jar-with-dependencies.jar \ No newline at end of file + path: target/sep3-parser-*-jar-with-dependencies.jar + 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: Build and Publish + run: mvn -B deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file