Skip to content

ci: add package deployment on release #1

ci: add package deployment on release

ci: add package deployment on release #1

Workflow file for this run

name: Main Build
on:
push:
branches:
- release-0.5.0
release:
types: [created]
env:
JAVA_VERSION: "8"
MAVEN_PROFILE: "gh-action"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"
cache: maven
server-id: central # Value of the publishingServerId of central-publishing-maven-plugin plugin of the pom.xml
server-username: MAVEN_USERNAME # Value of the server username in the settings.xml
server-password: MAVEN_CENTRAL_TOKEN # Value of the server password in the settings.xml
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of armored the private key
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish package to Sonatype Maven Central
run: mvn -B -P ${{ env.MAVEN_PROFILE}} -Dgpg.keyname=${{ secrets.MAVEN_GPG_KEYNAME }} deploy