Skip to content

[maven-release-plugin] prepare release xml-format-maven-plugin-4.0.0 #168

[maven-release-plugin] prepare release xml-format-maven-plugin-4.0.0

[maven-release-plugin] prepare release xml-format-maven-plugin-4.0.0 #168

Workflow file for this run

name: Maven Build and Deployment
on: [push, pull_request]
jobs:
build:
name: Java Latest LTS Build and Verify
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
cache: maven
- name: Build with Maven
run: ./mvnw -B -V verify --no-transfer-progress
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v4
compatibility-checks:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 17, 21, 23, 24-ea]
name: Java ${{ matrix.java }} Compatibility
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Test with Maven
run: ./mvnw -B -V test
compatibility-checks-java8-maven363:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8]
name: Java ${{ matrix.java }} Compatibility with Maven 3.6.3
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ matrix.java }}
cache: maven
- name: Load Maven 3.6.3
run: mvn -B -V org.apache.maven.plugins::maven-wrapper-plugin:3.3.2:wrapper -Dmaven=3.6.3 --no-transfer-progress
- name: Test with Maven
run: ./mvnw -B -V test
compatibility-checks-java21-maven400:
runs-on: ubuntu-latest
strategy:
matrix:
java: [21]
name: Java ${{ matrix.java }} Compatibility with Maven 4.0.0-beta-4
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ matrix.java }}
cache: maven
- name: Load Maven 4.0.0-beta-4
run: mvn -B -V org.apache.maven.plugins::maven-wrapper-plugin:3.3.2:wrapper -Dmaven=4.0.0-beta-4 --no-transfer-progress
- name: Test with Maven
run: ./mvnw -B -V test
deploy:
name: Deploy to OSSRH
needs: [build, compatibility-checks]
if: github.event_name == 'push' && github.repository_owner == 'acegi'
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
cache: maven
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.gpg_private_key }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish Maven package
run: ./mvnw -B -V -Possrh-deploy deploy --no-transfer-progress
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}
MAVEN_USERNAME: ${{ secrets.nexus_username }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.nexus_password }}