diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml new file mode 100644 index 0000000..3300709 --- /dev/null +++ b/.github/workflows/build-publish.yml @@ -0,0 +1,26 @@ +name: Build and Publish + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + release: + types: [published] + +jobs: + build: + uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main + with: + java-version: "8" + secrets: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + + publish: + if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release' }} + needs: build + uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main + secrets: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} diff --git a/pom.xml b/pom.xml index fead999..7d20d9e 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,19 @@ http://www.mekomsolutions.com + + + Mekom Solutions Nexus repo for releases + mks-nexus-public-releases + https://nexus.mekomsolutions.net/repository/maven-releases + + + Mekom Solutions Nexus repo for snapshots + mks-nexus-public-snapshots + https://nexus.mekomsolutions.net/repository/maven-snapshots + + +