From f8611bc4c911037b0d5d07d4b7d0e11d5cb1a7c7 Mon Sep 17 00:00:00 2001 From: zrbrown Date: Thu, 28 Dec 2023 10:59:09 -0500 Subject: [PATCH] reverting to basic settings, but use ssh action to make release:perform work --- .github/github-actions-settings.xml | 14 -------------- .github/workflows/release.yml | 14 +++++++++++--- 2 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 .github/github-actions-settings.xml diff --git a/.github/github-actions-settings.xml b/.github/github-actions-settings.xml deleted file mode 100644 index 8d4338c..0000000 --- a/.github/github-actions-settings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - ossrh - ${env.OSSRH_USERNAME} - ${env.OSSRH_PASSWORD} - - - gpg.passphrase - ${env.MAVEN_GPG_PASSPHRASE} - - - \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e3f2f0..ceae16c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,17 +24,25 @@ jobs: with: distribution: 'oracle' java-version: '17' + server-id: ossrh + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE cache: 'maven' - name: Configure git run: | git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - name: Maven Prepare Release - run: mvn --settings .github/github-actions-settings.xml --batch-mode release:clean release:prepare -Dtag=v${{ github.event.inputs.releaseVersion }} -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} + run: mvn --batch-mode release:clean release:prepare -Dtag=v${{ github.event.inputs.releaseVersion }} -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} env: MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - - name: Maven Release - run: mvn --settings .github/github-actions-settings.xml --batch-mode release:perform + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.REPO_SSH_PRIVATE_KEY }} + name: Maven Release + run: mvn --batch-mode release:perform env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}