Skip to content

Publish package to the Maven Central Repository #12

Publish package to the Maven Central Repository

Publish package to the Maven Central Repository #12

Workflow file for this run

name: Publish package to the Maven Central Repository
on:
release:
types: [created]
# workflow_dispatch:
concurrency:
group: ${{ github.ref }}
jobs:
publish:
name: Publish package to the Maven Central Repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Build Package
run: mvn clean package
# - name: Generate Release notes
# shell: bash
# run: |
# LOG=git log --pretty=oneline $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" | wc l
- name: Publish package
shell: bash
run: |
mvn clean deploy -B -U --settings ./.github/settings.xml -DperformRelease=true -DskipTests=true
env:
SONATYPE_ENCRYPTION_PASSWORD: ${{ secrets.SONATYPE_ENCRYPTION_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}