From 9724dc834285d411e134fea8060b34341aad22f7 Mon Sep 17 00:00:00 2001 From: Eugene Platonov Date: Sun, 29 Sep 2024 18:33:54 -0400 Subject: [PATCH] Fix GH Actions release script (attempt #N+6) --- .github/workflows/release.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7bff2c7f..079a35eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,15 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Setup git profile + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Set up JDK uses: actions/setup-java@v4 with: @@ -21,15 +30,9 @@ jobs: gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # has to be read directly from secrets gpg-passphrase: MAVEN_GPG_PASSPHRASE # default name used by maven-gpg-plugin - - name: Setup git profile - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - - name: Release new version run: mvn clean -Darguments=-DskipTests -ntp -B release:clean release:prepare release:perform -P release env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - GITHUB_TOKEN: ${{ github.token }}