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 SDK package to Maven Central | |
on: | |
release: | |
types: [created] | |
jobs: | |
publishClientJvmOnMavenCentral: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && contains(github.ref, 'sdk') | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Perform build | |
run: ./gradlew :experiment-sdk:build :experiment-sdk:publishToMavenLocal | |
- name: Release to Maven Central | |
run: ./gradlew :experiment-sdk:publishToSonatype closeAndReleaseStagingRepository -i | |
env: | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }} | |
PGP_KEY: ${{ secrets.PGP_KEY }} | |
PGP_PWD: ${{ secrets.PGP_PWD }} |