Skip to content

Commit aac8e09

Browse files
committed
chore: update GH actions workflows
1 parent c53c008 commit aac8e09

File tree

4 files changed

+60
-36
lines changed

4 files changed

+60
-36
lines changed

.github/workflows/gradle.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,54 @@ jobs:
1313
matrix:
1414
java: ['11', '14']
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Set up JDK
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
distribution: 'adopt'
2121
java-version: ${{ matrix.java }}
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v3
24+
with:
25+
# Publish a Gradle build scan so you can see all the build logs,
26+
# a complete task timeline, test outputs, and the resolved dependencies of your build.
27+
build-scan-publish: true
28+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
29+
build-scan-terms-of-use-agree: "yes"
2230
- name: Run Build
2331
id: build
24-
uses: gradle/gradle-build-action@v2
32+
run: ./gradlew build
2533
env:
2634
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
27-
with:
28-
arguments: build
2935
publish:
3036
if: github.event_name == 'push'
3137
needs: ["build"]
3238
runs-on: ubuntu-latest
3339
steps:
34-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
3541
- name: Set up JDK
36-
uses: actions/setup-java@v3
42+
uses: actions/setup-java@v4
3743
with:
3844
distribution: 'adopt'
3945
java-version: '11'
46+
- name: Setup Gradle
47+
uses: gradle/actions/setup-gradle@v3
48+
with:
49+
build-scan-publish: true
50+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
51+
build-scan-terms-of-use-agree: "yes"
4052
- name: Publish to Artifactory (repo.grails.org)
41-
uses: gradle/gradle-build-action@v2
53+
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
4254
env:
4355
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4456
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
4557
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
46-
with:
47-
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
4858
trigger-build-gorm-impls:
4959
if: github.event_name == 'push'
5060
needs: ["build", "publish"]
5161
runs-on: ubuntu-latest
5262
steps:
53-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
5464
- name: Extract branch name
5565
id: extract_branch
5666
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT

.github/workflows/groovy-joint-workflow.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
distribution: 'adopt'
4444
java-version: '11.0.6'
4545
- name: Cache local Maven repository & Groovy
46-
uses: actions/cache@v3
46+
uses: actions/cache@v4
4747
with:
4848
path: |
4949
~/groovy
@@ -122,7 +122,7 @@ jobs:
122122
distribution: 'adopt'
123123
java-version: '11'
124124
- name: Cache local Maven repository & Groovy
125-
uses: actions/cache@v3
125+
uses: actions/cache@v4
126126
with:
127127
path: |
128128
~/groovy
@@ -131,12 +131,18 @@ jobs:
131131
- name: Set CI_GROOVY_VERSION for Grails
132132
run: |
133133
echo "CI_GROOVY_VERSION=${{needs.build_groovy.outputs.groovyVersion}}" >> $GITHUB_ENV
134+
- name: Setup Gradle
135+
uses: gradle/actions/setup-gradle@v3
136+
with:
137+
# Publish a Gradle build scan so you can see all the build logs,
138+
# a complete task timeline, test outputs, and the resolved dependencies of your build.
139+
build-scan-publish: true
140+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
141+
build-scan-terms-of-use-agree: "yes"
134142
- name: Build GORM
135143
id: build_gorm
136-
uses: gradle/gradle-build-action@v2
144+
run: >
145+
./gradlew build
146+
-x groovydoc
137147
env:
138148
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
139-
with:
140-
arguments: |
141-
build
142-
-x groovydoc

.github/workflows/release-notes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
release_notes:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Check if it has release drafter config file
1919
id: check_release_drafter
2020
run: |
@@ -24,7 +24,7 @@ jobs:
2424
id: extract_branch
2525
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
2626
# If it has release drafter:
27-
- uses: release-drafter/release-drafter@v5
27+
- uses: release-drafter/release-drafter@v6
2828
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/release.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
GIT_USER_EMAIL: [email protected]
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
token: ${{ secrets.GH_TOKEN }}
1919
- name: Set up JDK
20-
uses: actions/setup-java@v3
20+
uses: actions/setup-java@v4
2121
with:
2222
distribution: 'adopt'
2323
java-version: 11
@@ -35,12 +35,18 @@ jobs:
3535
- name: Set the current release version
3636
id: release_version
3737
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@v3
40+
with:
41+
# Publish a Gradle build scan so you can see all the build logs,
42+
# a complete task timeline, test outputs, and the resolved dependencies of your build.
43+
build-scan-publish: true
44+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
45+
build-scan-terms-of-use-agree: "yes"
3846
- name: Run Assemble
3947
if: success()
4048
id: assemble
41-
uses: gradle/gradle-build-action@v2
42-
with:
43-
arguments: assemble
49+
run: ./gradlew assemble
4450
env:
4551
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4652
- name: Upload Distribution
@@ -55,7 +61,10 @@ jobs:
5561
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
5662
- name: Publish to Sonatype OSSRH
5763
id: publish
58-
uses: gradle/gradle-build-action@v2
64+
run: >
65+
./gradlew -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
66+
publishToSonatype
67+
closeSonatypeStagingRepository
5968
env:
6069
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
6170
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
@@ -64,11 +73,6 @@ jobs:
6473
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
6574
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
6675
SECRING_FILE: ${{ secrets.SECRING_FILE }}
67-
with:
68-
arguments: |
69-
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
70-
publishToSonatype
71-
closeSonatypeStagingRepository
7276
release:
7377
needs: publish
7478
runs-on: ubuntu-latest
@@ -80,17 +84,21 @@ jobs:
8084
with:
8185
token: ${{ secrets.GH_TOKEN }}
8286
ref: v${{ needs.publish.outputs.release_version }}
87+
- name: Setup Gradle
88+
uses: gradle/actions/setup-gradle@v3
89+
with:
90+
build-scan-publish: true
91+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
92+
build-scan-terms-of-use-agree: "yes"
8393
- name: Nexus Staging Close And Release
84-
uses: gradle/gradle-build-action@v2
94+
run: >
95+
./gradlew findSonatypeStagingRepository
96+
releaseSonatypeStagingRepository
8597
env:
8698
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8799
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
88100
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
89101
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
90-
with:
91-
arguments: |
92-
findSonatypeStagingRepository
93-
releaseSonatypeStagingRepository
94102
- name: Run post-release
95103
if: success()
96104
uses: micronaut-projects/github-actions/post-release@master

0 commit comments

Comments
 (0)