From 28e2433f0406c1cef7c3d861f11a3a09defe19dd Mon Sep 17 00:00:00 2001 From: Daud Kakumirizi Date: Mon, 14 Oct 2024 14:50:38 +0300 Subject: [PATCH] INFRA-411: Use shared GA workflows to build and publish (#13) --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ pom.xml | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..912bf64 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +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 cef92ff..87f9c7e 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,19 @@ UTF-8 + + + mks-nexus-public-releases + Mekom Solutions Nexus repo for releases + https://nexus.mekomsolutions.net/repository/maven-releases + + + mks-nexus-public-snapshots + Mekom Solutions Nexus repo for snapshots + https://nexus.mekomsolutions.net/repository/maven-snapshots + + +