From 85725549d989ee8fa374863941c72f3037068a49 Mon Sep 17 00:00:00 2001 From: Bertil Chapuis Date: Sun, 8 Sep 2024 12:54:15 +0200 Subject: [PATCH] Deploy snapshot on Apache Nexus (#893) --- .github/workflows/deploy-snapshot.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/deploy-snapshot.yml diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml new file mode 100644 index 000000000..59b3da8f2 --- /dev/null +++ b/.github/workflows/deploy-snapshot.yml @@ -0,0 +1,41 @@ +name: Deploy snapshot + +on: + push: + branches: + - main + +jobs: + deploy-snapshot: + name: Deploy snapshot + runs-on: ubuntu-latest + if: "!startsWith(github.ref, 'refs/tags/v')" + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Java 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: temurin + cache: maven + server-id: apache.snapshots.https + server-username: NEXUS_USER + server-password: NEXUS_PW + gpg-private-key: ${{ secrets.BAREMAPS_GPG_SECRET_KEY }} + + - name: Set up GPG + run: | + echo "${{ secrets.BAREMAPS_GPG_SECRET_KEY }}" | gpg --batch --import + gpg --list-keys + env: + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + + - name: Publish snapshots on Apache Nexus + env: + NEXUS_USER: ${{ secrets.NEXUS_USER }} + NEXUS_PW: ${{ secrets.NEXUS_PW }} + run: | + ./mvnw deploy -DskipTests -Dmaven.javadoc.skip=true -B -V