diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56e5176..694433a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,16 +16,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: setup gpg key - id: gpg - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - fingerprint: ${{ vars.GPG_SIGNING_KEY_ID }} - git_user_signingkey: true - git_commit_gpgsign: true - git_config_global: true - uses: actions/setup-java@v3 with: java-version: 17 @@ -33,9 +23,7 @@ jobs: cache: maven gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Build Package - run: mvn --batch-mode --no-transfer-progress install -Prelease - env: - MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: mvn --batch-mode --no-transfer-progress install # - name: Test with or without coverage # - name: Store test results # - name: Check test results @@ -71,7 +59,16 @@ jobs: - uses: actions/download-artifact@v3 with: name: maven-distro - - name: Setup Maven Central + - id: gpg + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + fingerprint: ${{ vars.GPG_SIGNING_KEY_ID }} + git_user_signingkey: true + git_commit_gpgsign: true + git_config_global: true + - id: java uses: actions/setup-java@v3 with: java-version: 17 @@ -80,8 +77,9 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - - name: Publish Package + - id: publish run: mvn --batch-mode --no-transfer-progress deploy -Prelease env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}