fix(deps): update maven.version to v3.9.9 (#1202) #2837
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: 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 }} |