From 74774817f504a0af1b165aeb221be5b330b4095c Mon Sep 17 00:00:00 2001 From: Pasindu Owa Gamage Date: Sat, 21 Feb 2026 17:51:49 +0530 Subject: [PATCH 1/2] Created Build with Maven workflow for CI --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..db8c379 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Java CI with Maven + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Build with Maven + run: mvn -B clean install --file pom.xml \ No newline at end of file From 2abfe073410765be925c56a3eff312111896536a Mon Sep 17 00:00:00 2001 From: Pasindu Owa Gamage Date: Sat, 21 Feb 2026 18:29:27 +0530 Subject: [PATCH 2/2] Setup repository secrets to build file --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db8c379..8c8fdea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,10 @@ jobs: java-version: '17' distribution: 'temurin' cache: maven + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Build with Maven + env: + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: mvn -B clean install --file pom.xml \ No newline at end of file