Skip to content
name: Publish package to the Maven Central Repository
on:
release:
types: [published]
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Build
run: ./gradlew build
- name: Publish package
run: ./gradlew publishAllPublicationsToMavenCentralRepository
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SHAKY_ANDROID_GPG_PRIVATE_KEY: ${{ secrets.SHAKY_ANDROID_GPG_PRIVATE_KEY }}
SHAKY_ANDROID_GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.SHAKY_ANDROID_GPG_PRIVATE_KEY_PASSWORD }}