diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8611f2d..6f054ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,9 +17,9 @@ jobs: uses: actions/setup-java@v3 with: java-version: '11' + cache: 'maven' distribution: 'adopt' - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + - name: Configure Maven settings run: | @@ -30,8 +30,11 @@ jobs: run: mvn --batch-mode --update-snapshots clean test spotless:check ossindex:audit - name: Deploy to Maven Central + env: + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY }} + MAVEN_GPG_KEY: ${{ secrets.GPG_PASSPHRASE }} if: success() - run: mvn deploy -P release + run: MAVEN_GPG_PASSPHRASE=$MAVEN_GPG_PASSPHRASE MAVEN_GPG_KEY=${MAVEN_GPG_KEY} mvn deploy -DskipTests - name: Create GitHub Release if: success() diff --git a/pom.xml b/pom.xml index 30e5975..411bff4 100644 --- a/pom.xml +++ b/pom.xml @@ -174,7 +174,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.6 sign-artifacts @@ -183,10 +183,7 @@ sign - - --pinentry-mode - loopback - + bc