- Migration to log4j2 #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Snapshot | |
on: | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- '**' | |
paths-ignore: | |
- '**.md' | |
env: | |
MAVEN_OPTS: ${{ vars.MAVEN_OPTS }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
# - name: Cache Maven packages | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.m2 | |
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
# restore-keys: ${{ runner.os }}-m2 | |
- name: Prepare Maven settings.xml | |
run: | | |
cat "${{ github.workspace }}/.github/settings.xml" > ~/.m2/settings.xml | |
- name: Build with Maven | |
run: mvn --batch-mode --update-snapshots package | |
- name: Notify on success | |
if: success() | |
run: | | |
echo "Snapshot has been successfully deployed to OSS SonaType." | |
- name: Notify on failure | |
if: failure() | |
run: | | |
echo "Snapshot deployment failed. Please check the logs for more information." |