Skip to content

Publish to Maven Central repository #3

Publish to Maven Central repository

Publish to Maven Central repository #3

Workflow file for this run

# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven
name: Maven CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# temurin LTS versions
version: [17, 21]
steps:
- uses: actions/checkout@v4
# setup
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.version }}
distribution: 'temurin'
cache: maven
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# verify
# https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
- name: Run maven verify
run: mvn --batch-mode --update-snapshots --fail-fast verify
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}