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