10
10
jobs :
11
11
build :
12
12
runs-on : ubuntu-latest
13
- strategy :
14
- matrix :
15
- java : ['11']
16
13
env :
17
14
WORKSPACE : ${{ github.workspace }}
18
15
GRADLE_OPTS : -Xmx1500m -Dfile.encoding=UTF-8
19
16
steps :
20
- - uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
17
+ - uses : actions/checkout@v4
21
18
- name : Set up JDK
22
19
uses : actions/setup-java@v3
23
20
with :
24
21
distribution : ' adopt'
25
- java-version : ${{ matrix.java }}
26
- - name : Run Tests
27
- if : github.event_name == 'pull_request'
28
- id : tests
29
- uses : gradle/gradle-build-action@v2
30
- with :
31
- arguments : check -Dgeb.env=chromeHeadless
32
- env :
33
- GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
34
- GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
35
- GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
22
+ java-version : ' 11'
36
23
- name : Run Build
37
- if : github.event_name == 'push'
38
- id : build
39
24
uses : gradle/gradle-build-action@v2
40
25
env :
41
26
GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
42
27
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
43
28
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
44
29
with :
45
30
arguments : build -Dgeb.env=chromeHeadless
46
- - name : Publish Test Report
47
- if : steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
48
- uses : scacap/action-surefire-report@v1
31
+ publish :
32
+ if : github.event_name == 'push'
33
+ needs : ['build']
34
+ runs-on : ubuntu-latest
35
+ steps :
36
+ - uses : actions/checkout@v4
37
+ - name : Set up JDK
38
+ uses : actions/setup-java@v3
49
39
with :
50
- github_token : ${{ secrets.GITHUB_TOKEN }}
51
- report_paths : ' **/build/test-results/test/TEST-*.xml '
52
- - name : Publish to repo.grails.org
40
+ distribution : ' adopt '
41
+ java-version : ' 11 '
42
+ - name : Publish Artifacts ( repo.grails.org)
53
43
id : publish
54
44
uses : gradle/gradle-build-action@v2
55
- if : steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '11'
56
45
env :
57
46
GRADLE_ENTERPRISE_ACCESS_KEY : ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
58
47
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER : ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
@@ -62,13 +51,12 @@ jobs:
62
51
with :
63
52
arguments : -Dorg.gradle.internal.publish.checksums.insecure=true publish
64
53
- name : Publish to Github Pages
65
- if : steps.publish.outcome == ' success' && github.event_name == 'push' && matrix.java == '11'
66
- uses : micronaut-projects/github-pages-deploy-action@master
54
+ if : success()
55
+ uses : micronaut-projects/github-pages-deploy-action@grails
67
56
env :
68
- TARGET_REPOSITORY : ${{ steps.docs_target.outputs.value }}
69
57
GH_TOKEN : ${{ secrets.GH_TOKEN }}
70
58
BRANCH : gh-pages
71
59
FOLDER : build/docs
72
60
DOC_FOLDER : gh-pages
73
61
74
- COMMIT_NAME : Puneet Behl
62
+ COMMIT_NAME : Puneet Behl
0 commit comments