[global-appl-pom] #1 : update project config #50
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: maven-build | |
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 10 * * 1' | |
push: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- '.github/workflows/sonarcloud.yml' | |
- '.run/**' | |
- '.m2/**' | |
- '.repo/**' | |
env: | |
# Github Additional Configuration | |
GITHUB_REPO_NAME: ${{ github.event.repository.name }} | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_PROJECT_DIR: ${{ github.workspace }} | |
GITHUB_TARGET_DIR: ${{ github.workspace }}/target | |
GITHUB_BRANCH_NAME: ${{ github.ref_name }} | |
GITHUB_UPLOAD_DIR: ${{ github.workspace }}/target/staging | |
GITHUB_UPLOAD_NAME: ${{ github.event.repository.name }}.zip | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PCK_READ_TOKEN: ${{ secrets.PCK_READ_TOKEN }} | |
PCK_WRITE_TOKEN: ${{ secrets.PCK_WRITE_TOKEN }} | |
# Maven Common Configuration | |
MVN_HOME_DIR: ~/.m2 | |
MVN_REPO_JOB_DIR: ${{ github.workspace }}/.repo | |
MVN_SETTING_JOB_FILE: ${{ github.workspace }}/.m2/settings.xml | |
MVN_SETT_OPTS: -V -B | |
MVN_SETS_OPTS: -V -B -s${{ github.workspace }}/.m2/settings.xml | |
MVN_REPO_OPTS: -Dmaven.repo.local=${{ github.workspace }}/.repo | |
# Codacy Configuration | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }} | |
MVN_CODACY_OPTS: -DcoverageReportFile=target/jacoco/comm/jacoco.xml -DprojectToken=${{ secrets.CODACY_PROJECT_TOKEN }} -DapiToken=${{ secrets.CODACY_API_TOKEN }} | |
# Coveralls Configuration | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
MVN_COVERALLS_OPTS: -Dbranch=${{ github.ref_name }} -DrepoToken=${{ secrets.COVERALLS_REPO_TOKEN }} | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
version: [17] | |
distribution: [adopt] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: setup JDK | |
uses: actions/setup-java@4.0.0 | |
with: | |
java-version: '${{ matrix.version }}' | |
distribution: '${{ matrix.distribution }}' | |
architecture: x64 | |
- name: cache maven packages | |
uses: actions/cache@v4.0.0 | |
with: | |
path: ${{ env.MVN_REPO_JOB_DIR }} | |
key: ${{ matrix.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ matrix.os }}-m2 | |
- name: maven build | |
run: bash ${{ env.GITHUB_PROJECT_DIR}}/.mvn/.build.sh -do | |
- name: upload artifact | |
uses: actions/upload-artifact@v4.3.0 | |
with: | |
name: ${{ env.GITHUB_UPLOAD_NAME }} | |
path: ${{ env.GITHUB_UPLOAD_DIR }} | |
if-no-files-found: warn | |
retention-days: 3 |