Skip to content

Build updates for Grails 7 #62

Build updates for Grails 7

Build updates for Grails 7 #62

Workflow file for this run

name: Java CI
on:
push:
branches:
- 'master'
- '[5-9]+.[0-9]+.x'
pull_request:
branches:
- 'master'
- '[5-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- name: "πŸ“₯ Checkout the 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
- name: Run Build
run: ./gradlew build
publish:
if: github.event_name == 'push'
needs: ['build']
runs-on: ubuntu-latest
steps:
- name: "πŸ“₯ Checkout the 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
- name: "πŸ“€ Publish to Snapshot (repo.grails.org)"
id: publish
env:
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
run: ./gradlew publish
- name: "πŸ“œ Generate Documentation"
if: success()
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
working-directory: ${{ github.workspace }}
run: ./gradlew docs
- name: "πŸš€ Publish to Github Pages"
if: success()
uses: micronaut-projects/github-pages-deploy-action@grails
env:
SKIP_SNAPSHOT: ${{ contains(needs.publish.outputs.release_version, 'M') }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/asciidoc
DOC_FOLDER: gh-pages