Skip to content

Maven Package

Maven Package #19

Workflow file for this run

# Builds the library modules and publishes them to GitHub Packages.
#
# Triggers on a pushed version tag, on a created release, and on manual dispatch.
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Maven Package
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
# Scoped to the published library modules and the parent pom they inherit from.
# Building the whole reactor would pull in cfml.cli, whose native-maven-plugin binds
# native-image to the package phase and fails on a non-GraalVM JDK.
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy --projects :cfml.dictionary,:cfml.parsing --also-make --threads=2 --batch-mode -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}