Skip to content

fix(deps): update maven.version to v3.9.9 (#1202) #2837

fix(deps): update maven.version to v3.9.9 (#1202)

fix(deps): update maven.version to v3.9.9 (#1202) #2837

Workflow file for this run

name: Java CI
on:
push:
branches:
- master
- '[1-9]+.[0-9]+.x'
pull_request:
branches:
- master
- '[1-9]+.[0-9]+.x'
jobs:
snapshot:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17.0.12', '21']
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
GRAALVM_QUICK_BUILD: true
steps:
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "β˜•οΈ Install Java and Maven and set up Apache Maven Central"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
server-password: GH_TOKEN
- name: "πŸ”§ Setup GraalVM CE"
uses: graalvm/[email protected]
with:
distribution: 'graalvm'
java-version: ${{ matrix.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "πŸ“¦ Cache Maven packages"
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "πŸ”‘ Log into OCIR"
if: env.OCI_AUTH_TOKEN != ''
uses: oracle-actions/[email protected]
id: login-ocir
with:
auth_token: ${{ secrets.OCI_AUTH_TOKEN }}
- name: "⏬ Eagerly pull Docker images"
run: |
docker pull postgres:latest
- name: "πŸ§ͺ Run tests"
run: |
./mvnw -q install -Dinvoker.skip=true && ./mvnw verify
- name: "πŸ“Š Publish Test Report"
if: always()
uses: mikepenz/[email protected]
with:
check_name: Java CI / Test Report
report_paths: '**/target/invoker-reports/TEST-*.xml'
check_retries: 'true'
- name: "πŸ”Ž Run static analysis"
if: env.SONAR_TOKEN != '' && matrix.java == '17'
run: ./mvnw sonar:sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "❓ Determine current version"
if: success() && github.event_name == 'push' && matrix.java == '17'
id: release_version
run: echo ::set-output name=release_version::`./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout`
- name: "🌎 Generate site"
if: success() && github.event_name == 'push' && matrix.java == '17'
run: |
./mvnw site:site
cp -R target/site/apidocs/* micronaut-maven-plugin/target/site/apidocs
- name: "πŸ“‘ Publish to Github Pages"
if: success() && github.event_name == 'push' && matrix.java == '17'
uses: micronaut-projects/github-pages-deploy-action@master
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: micronaut-maven-plugin/target/site
- name: "πŸ›  Set up Maven"
if: success() && github.event_name == 'push' && endsWith(steps.release_version.outputs.release_version, 'SNAPSHOT') && matrix.java == '17'
uses: stCarolas/[email protected]
with:
maven-version: 3.9.0
- name: "πŸ“¦ Deploy snapshot"
if: success() && github.event_name == 'push' && endsWith(steps.release_version.outputs.release_version, 'SNAPSHOT') && matrix.java == '17'
uses: samuelmeuli/action-maven-publish@v1
with:
maven_args: "-Dinvoker.skip=true"
nexus_username: ${{ secrets.SONATYPE_USERNAME }}
nexus_password: ${{ secrets.SONATYPE_PASSWORD }}