fix input #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to Maven | |
on: | |
push: | |
branches: | |
- master | |
- maven | |
env: | |
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }} | |
SECRET_PASSPHRASE: ${{ secrets.SECRET_PASSPHRASE }} | |
SIGNING_KEYID: ${{ secrets.SIGNING_KEYID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SIGNING_SECRET_KEY_RING_CONTENT: ${{ secrets.SIGNING_SECRET_KEY_RING_CONTENT }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Prepare environment | |
run: | | |
echo '$SIGNING_SECRET_KEY_RING_CONTENT' | base64 -id > 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" |