Skip to content
name: Maven build and package for main
on:
push:
branches:
- main
- 'releases/**'
tags:
- 'v**'
release:
types: [created]
jobs:
build:
name: Maven build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8*
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
- name: Build with Maven
run: |
mvn dependency:resolve -B -U
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B
mvn -B package --file pom.xml
- name: Publish to GitHub Packages
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
run: mvn -B deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}