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