-
Notifications
You must be signed in to change notification settings - Fork 198
152 lines (152 loc) Β· 5.52 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: "Java CI"
on:
push:
branches:
- '[7-9]+.[0-9]+.x'
pull_request:
branches:
- '[7-9]+.[0-9]+.x'
env:
GIT_USER_NAME: grails-build
GIT_USER_EMAIL: grails-build@users.noreply.github.com
jobs:
build:
name: "Build Project"
runs-on: ubuntu-24.04
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
java: [17, 21]
steps:
- name: "π₯ Checkout the repository"
uses: actions/checkout@v4
- name: "βοΈ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: liberica
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π¨ Run Build"
id: build
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build --continue
publish:
if: github.event_name == 'push'
name: "Publish Snapshot"
needs: build
runs-on: ubuntu-24.04
permissions:
contents: read
packages: read
steps:
- name: "π₯ Checkout the repository"
uses: actions/checkout@v4
- name: "βοΈ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: 17
distribution: liberica
- name: "π Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π€ Publish Snapshot to repo.grails.org"
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
# NOTE: secrets.MAVEN_PUBLISH_URL == https://repo.grails.org/grails/plugins3-snapshot-local
MAVEN_PUBLISH_URL: https://repo.grails.org/grails/libs-snapshots-local
run: ./gradlew --no-build-cache publish
docs:
if: github.event_name == 'push'
needs: publish
runs-on: ubuntu-24.04
permissions:
contents: write
packages: read
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
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "π¨ Build Docs"
id: docs
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew docs --refresh-dependencies
- name: "π€ Publish docs to Github Pages"
if: steps.docs.outcome == 'success'
uses: grails/github-pages-deploy-action@v2
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
trigger-build-gorm-impls:
if: github.event_name == 'push'
name: "Trigger Build in GORM Implementations"
needs: [build, publish]
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- name: "π Store the target branch"
id: extract_branch
run: |
echo "π Determine 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 Data Mapping Snapshots $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
- name: "π‘ Invoke the Java CI workflow in GORM Hibernate5"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
continue-on-error: true
with:
workflow: Java CI
repo: grails/gorm-hibernate5
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
- name: "π‘ Invoke the Java CI workflow in GORM Hibernate6"
continue-on-error: true
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/gorm-hibernate6
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
- name: "π‘ Invoke the Java CI workflow in GORM MongoDB"
continue-on-error: true
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/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: false # Skip until neo4j is ported to grails 7
continue-on-error: true
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/gorm-neo4j
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}