CI - Maven Publish Release #88
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: CI - Maven Publish Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
# Publish nightly builds | |
schedule: | |
- cron: '0 0 * * *' # run at midnight UTC | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Release to Maven Central | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release Maven package | |
uses: samuelmeuli/action-maven-publish@v1 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg_passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} | |
nexus_username: ${{ secrets.SONATYPE_USERNAME }} | |
nexus_password: ${{ secrets.SONATYPE_PASSWORD }} | |
server_id: ossrh | |
maven_profiles: release | |
maven_goals_phases: clean deploy | |
maven_args: -DskipTests -Dspotless.skip=true |