Build updates for Grails 7 #62
Workflow file for this run
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' | |
- '[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 |