1.0.0 init release #2
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 Central | |
on: | |
release: | |
types: | |
- created | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
environment: prod | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4.1.0 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
- name: Access API Keys | |
run: | | |
touch gradle.properties | |
echo GPG_KEYNAME=${{ secrets.GPG_KEYNAME }} >> gradle.properties | |
echo GPG_PASSPHRASE=${{ secrets.GPG_PASSPHRASE }} >> gradle.properties | |
cat gradle.properties | |
- name: Publish to Sonatype Central | |
env: | |
GIT_TAG: ${{github.ref_name}} | |
SONATYPE_USER: ${{ secrets.SONATYPE_TOKEN_USER }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD}} | |
run: ./gradlew publishToCentralPortal |