Skip to content

Publish SDK to the Maven Central Repository #14

Publish SDK to the Maven Central Repository

Publish SDK to the Maven Central Repository #14

Workflow file for this run

name: Publish JAVA sdk to the Maven Central Repository
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: 'Set up GCP SDK for downloading test data'
uses: 'google-github-actions/setup-gcloud@v0'
- name: Download test data
run: make test-data
- name: Deploy package
run: mvn clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish package
run: mvn nexus-staging:release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}