Skip to content

Update apache-maven-resolver monorepo to v2 (major) #4215

Update apache-maven-resolver monorepo to v2 (major)

Update apache-maven-resolver monorepo to v2 (major) #4215

Workflow file for this run

name: "Java CI"
on:
push:
branches:
- '[4-9]+.[0-9]+.x'
- '[3-9]+.[3-9]+.x'
pull_request:
branches:
- '[4-9]+.[0-9]+.x'
- '[3-9]+.[3-9]+.x'
workflow_dispatch:
jobs:
build:
permissions:
contents: read # to fetch code (actions/checkout)
strategy:
matrix:
java: [17, 21, 23]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: "πŸ”¨ Build project"
id: build
env:
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
run: ./gradlew build groovydoc
publish:
if: github.event_name == 'push'
needs: build
permissions:
contents: read # limit to read access
runs-on: ubuntu-latest
steps:
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 17
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: "πŸ“€ Publish Snapshot Artifacts to Artifactory (repo.grails.org/libs-snapshot-local)"
id: publish
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
run: >
./gradlew
-Dorg.gradle.internal.publish.checksums.insecure=true
publish
docs:
if: github.event_name == 'push'
needs: publish
runs-on: ubuntu-latest
permissions:
contents: read # limit to read access
steps:
- name: "πŸ“ Store the target branch"
id: extract_branch
run: |
echo "Determining Target Branch"
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
echo $TARGET_BRANCH
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- name: "πŸ“‘ Invoke the grails-doc release workflow"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
with:
workflow: Java CI
repo: grails/grails-doc
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
invoke-third-party-workflows:
if: github.event_name == 'push'
needs: [build, publish]
permissions:
contents: read # limit to read access
runs-on: ubuntu-latest
steps:
- name: "πŸ“ Store the target branch"
id: extract_branch
run: |
echo "Determining Target Branch"
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
echo $TARGET_BRANCH
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- name: "πŸ“ Create Snapshot Message for the Workflow Dispatch"
id: dispatch_message
run: echo "value={\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
- name: "πŸ“‘ Invoke the Java CI workflow in Grails Functional Tests"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
with:
workflow: Java CI
repo: grails/grails-functional-tests
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}