Skip to content

Merge pull request #606 from apache/gradle-8.14.2 #2208

Merge pull request #606 from apache/gradle-8.14.2

Merge pull request #606 from apache/gradle-8.14.2 #2208

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Java CI"
on:
push:
branches:
- '[6-9]+.[0-9]+.x'
pull_request:
branches:
- '[6-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
build:
name: "Build project"
runs-on: ubuntu-24.04
strategy:
matrix:
java: [ '17', '21' ]
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.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "🔨 Build"
id: build
run: ./gradlew build --rerun-tasks
- name: "✅ Verify Forge CLI"
run: |
cp grails-forge-cli/build/distributions/grails-forge-cli-*.zip forge-cli.zip
unzip forge-cli -d tmp
mv tmp/grails-forge-cli-* tmp/forge-cli
./tmp/forge-cli/bin/grails-forge-cli --version
- name: "✅ Verify combined CLI"
run: |
cp grails-cli/build/distributions/apache-grails-*.zip cli.zip
unzip cli -d tmp1
mv tmp1/apache-grails-* tmp1/cli
./tmp1/cli/bin/grails --version
- name: "📤 Upload CLI Zip to Workflow Summary Page"
if: ${{ matrix.java == '17' }}
uses: actions/upload-artifact@v4
with:
name: 'apache-grails-SNAPSHOT-incubating-bin.zip'
include-hidden-files: true
path: tmp1/cli/**/*
if-no-files-found: 'error'
publish:
if: github.repository_owner == 'apache' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
needs: build
runs-on: ubuntu-24.04
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.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "📤 Publish Snapshot artifacts"
env:
GRAILS_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW }}
run: ./gradlew publish --no-build-cache --rerun-tasks