Update pom.xml - Set initial version #1
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 package to the Maven Central Repository | |
# This script will run automatically when | |
# a new tag is created with 'v' prefix | |
on: | |
push: | |
tags: | |
- v* | |
pull_request: | |
branches: [ main ] | |
jobs: | |
maven_deploy: | |
name: Deploy to Maven | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v1 | |
- name: Set up Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '8.0' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Release to Central Repository | |
# --no-transfer-progress -> suppress dependency download logs | |
# --batch-mode -> Run in non-interactive | |
# -Prelease -> relase mvn profile Id | |
# maven.deploy.skip=true -> we are using nexus-staging-maven-plugin | |
# to upload to central repositoy | |
# So disable default maven.deploy plugin | |
run: mvn --no-transfer-progress --batch-mode -Prelease clean deploy -Dmaven.deploy.skip=true | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |