diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml new file mode 100644 index 00000000..40bd7605 --- /dev/null +++ b/.github/workflows/maven-build.yml @@ -0,0 +1,45 @@ +name: build on maven + +on: + watch: + types: [started] + pull_request: + types: [opened, reopened, edited] + push: + branches: + - main + - master + + workflow_dispatch: + +jobs: + build: + name: Build with maven by ${{ github.actor }} + runs-on: ubuntu-latest + if: github.event.repository.owner.id == github.event.sender.id + env: + MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m" + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 11 for x64 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + architecture: x64 + + - uses: s4u/maven-settings-action@v2.8.0 + with: + servers: | + [{ + "id": "sonatype-nexus-snapshots", + "username": "${{ secrets.SONATYPE_BOT_USERNAME }}", + "password": "${{ secrets.SONATYPE_BOT_TOKEN }}" + }] + + - name: Build the Maven verify phase + run: mvn -B -V clean verify -Prun-its -Pci + + - name: Deploy the artifact + run: mvn help:effective-settings -B -V clean deploy -e