From 703499f0ff96303f74e5035da86acc273ffcb895 Mon Sep 17 00:00:00 2001 From: Madalin Ilie Date: Fri, 22 Nov 2024 10:23:02 +0200 Subject: [PATCH] chore: Add env variables back --- .github/workflows/release-to-maven-central.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-to-maven-central.yml b/.github/workflows/release-to-maven-central.yml index 27965e51..3623ed38 100644 --- a/.github/workflows/release-to-maven-central.yml +++ b/.github/workflows/release-to-maven-central.yml @@ -19,11 +19,11 @@ jobs: with: distribution: 'temurin' java-version: '21' - server-id: central - server-username: ${{ secrets.OSSRH_USERNAME}} - server-password: ${{ secrets.OSSRH_PASSWORD }} - gpg-private-key: ${{ secrets.GPG_SIGN_KEY }} - gpg-passphrase: ${{ secrets.GPG_SIGN_PASSPHRASE }} + server-id: ossrh + server-username: MAVEN_USERNAME # env variable for username in deploy + server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy + gpg-private-key: ${{ secrets.GPG_SIGN_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Set projects Maven version to GitHub Action GUI set version run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" @@ -36,4 +36,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish to Apache Maven Central - run: mvn -B deploy -Psign --file pom.xml \ No newline at end of file + run: mvn -B deploy -Psign --file pom.xml + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME}} + MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGN_PASSPHRASE }} \ No newline at end of file