From b8fda09dbb35b8316ac01dffc728f98afc306585 Mon Sep 17 00:00:00 2001 From: Abel Salgado Romero Date: Mon, 1 Jan 2024 22:41:00 +0100 Subject: [PATCH] WIP --- .github/workflows/build.yaml | 26 ++++++++++++++++++++++++++ pom.xml | 29 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0afa37cd..e1e227f0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -65,3 +65,29 @@ jobs: maven-version: ${{ matrix.maven }} - name: Build & Test run: mvn -B clean javadoc:jar + signature: + environment: test + env: + GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + java: + - 11 + maven: + - 3.9.6 + runs-on: ${{ matrix.os }} + steps: + - name: Prepare signature + run: echo -e "$GPG_PRIVATE_KEY" | gpg --import + - uses: s4u/setup-maven-action@v1.11.0 + with: + java-distribution: 'temurin' + java-version: ${{ matrix.java }} + maven-version: ${{ matrix.maven }} + - name: Build & Test + run: mvn -B clean install -Psign -DskipTests diff --git a/pom.xml b/pom.xml index a0cf928f..6893b1e4 100644 --- a/pom.xml +++ b/pom.xml @@ -234,6 +234,35 @@ + + sign + + + + org.apache.maven.plugins + maven-gpg-plugin + + gpg2 + ${env.GPG_KEYNAME} + ${env.GPG_PASSPHRASE} + + --pinentry-mode + loopback + + + + + sign-artifacts + verify + + sign + + + + + + +