diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 44b29c9..7072146 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,6 +5,7 @@ on: branches: - master - maven + env: SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }} SECRET_PASSPHRASE: ${{ secrets.SECRET_PASSPHRASE }} @@ -28,11 +29,11 @@ jobs: - name: Prepare environment run: | - echo '$SIGNING_SECRET_KEY_RING_CONTENT' | base64 -id > publish_key.gpg + echo "$SIGNING_SECRET_KEY_RING_CONTENT" | base64 -d > publish_key.gpg gpg --quiet --batch --yes --decrypt --passphrase="$SECRET_PASSPHRASE" --output secret.gpg publish_key.gpg - name: Grant execute permission for gradlew run: chmod +x ./gradlew - - name: Publish with gradle - run: ./gradlew publish -Psigning.secretKeyRingFile=secret.gpg -Psigning.keyId=$SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -Ptoken="$TOKEN" + - name: Publish with Gradle + run: ./gradlew publish -Psigning.secretKeyRingFile=secret.gpg -Psigning.keyId=$SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -Ptoken="$SONATYPE_TOKEN"