-
Notifications
You must be signed in to change notification settings - Fork 198
88 lines (88 loc) · 3.29 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Java CI
on:
push:
branches:
- master
- '[7-9]+.[0-9]+.x'
pull_request:
branches:
- master
- '[7-9]+.[0-9]+.x'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Optional setup step
run: |
[ -f ./setup.sh ] && ./setup.sh || true
- name: Run Tests
run: |
./gradlew --no-daemon --refresh-dependencies clean check
- name: Publish Test Report
if: failure()
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Run Assemble
if: success() && github.event_name == 'push' && matrix.java == '8'
run: ./gradlew assemble
- name: Publish to repo.grails.org
if: success() && github.event_name == 'push' && matrix.java == '8'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
- name: Extract branch name
if: success() && github.event_name == 'push' && matrix.java == '8'
id: extract_branch
run: echo ::set-output name=value::${GITHUB_REF:11}
- name: Create Snapshot Message for the Workflow Dispatch
if: success() && github.event_name == 'push' && matrix.java == '8'
id: dispatch_message
run: echo ::set-output name=value::{\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}
- name: Invoke the Java CI workflow in GORM Hibernate5
if: success() && github.event_name == 'push' && matrix.java == '8'
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-hibernate5
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}
- name: Invoke the Java CI workflow in GORM MongoDB
if: success() && github.event_name == 'push' && matrix.java == '8'
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-mongodb
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}
- name: Invoke the Java CI workflow in GORM Neo4j
if: success() && github.event_name == 'push' && matrix.java == '8'
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-neo4j
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}