Skip to content

Commit fc2b7d0

Browse files
authored
Merge pull request #1868 from grails/matrei/project-updates
Multiple Project updates
2 parents f4c0189 + 9a8242a commit fc2b7d0

File tree

83 files changed

+1067
-770
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1067
-770
lines changed

.github/workflows/gradle.yml

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: "Java CI"
22
on:
33
push:
44
branches:
@@ -8,83 +8,97 @@ on:
88
- '[7-9]+.[0-9]+.x'
99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
12+
permissions:
13+
contents: read
14+
packages: read
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
java: [17, 21]
1219
steps:
13-
- uses: actions/checkout@v4
14-
- name: Set up JDK
20+
- name: "📥 Checkout the repository"
21+
uses: actions/checkout@v4
22+
- name: "☕️ Setup JDK"
1523
uses: actions/setup-java@v4
1624
with:
25+
java-version: ${{ matrix.java }}
1726
distribution: liberica
18-
java-version: 17
19-
- name: Setup Gradle
27+
- name: "🐘 Setup Gradle"
2028
uses: gradle/actions/setup-gradle@v4
2129
with:
22-
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
23-
- name: Run Build
30+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
31+
- name: "🔨 Run Build"
2432
id: build
25-
run: ./gradlew build
2633
env:
27-
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
28-
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
2934
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
35+
run: ./gradlew build --continue
3036
publish:
3137
if: github.event_name == 'push'
32-
needs: ["build"]
33-
runs-on: ubuntu-latest
38+
needs: build
39+
runs-on: ubuntu-24.04
40+
permissions:
41+
contents: read
42+
packages: read
3443
steps:
35-
- uses: actions/checkout@v4
36-
- name: Set up JDK
44+
- name: "📥 Checkout the repository"
45+
uses: actions/checkout@v4
46+
- name: "☕️ Setup JDK"
3747
uses: actions/setup-java@v4
3848
with:
39-
distribution: liberica
4049
java-version: 17
41-
- name: Setup Gradle
50+
distribution: liberica
51+
- name: "🐘 Setup Gradle"
4252
uses: gradle/actions/setup-gradle@v4
4353
with:
44-
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
45-
- name: Publish to Artifactory (repo.grails.org)
46-
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
54+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
55+
- name: "📤 Publish Snapshot to repo.grails.org"
4756
env:
48-
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
49-
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
50-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
51-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
57+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
58+
GRADLE_PUBLISH_RELEASE: 'false'
59+
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
60+
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
61+
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
62+
run: ./gradlew --no-build-cache publish
5263
trigger-build-gorm-impls:
5364
if: github.event_name == 'push'
54-
needs: ["build", "publish"]
55-
runs-on: ubuntu-latest
65+
needs: [build, publish]
66+
runs-on: ubuntu-24.04
5667
steps:
57-
- uses: actions/checkout@v4
58-
- name: Extract branch name
68+
- name: "📝 Store the target branch"
5969
id: extract_branch
60-
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
61-
- name: Create Snapshot Message for the Workflow Dispatch
70+
run: |
71+
echo "🔍 Determine Target Branch"
72+
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
73+
echo $TARGET_BRANCH
74+
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
75+
- name: "📝 Create Snapshot Message for the Workflow Dispatch"
6276
id: dispatch_message
63-
run: echo "value={\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
64-
- name: Invoke the Java CI workflow in GORM Hibernate5
65-
uses: benc-uk/[email protected]
77+
run: echo "value={\"message\":\"New Data Mapping Snapshots $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
78+
- name: "📡 Invoke the Java CI workflow in GORM Hibernate5"
79+
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
6680
with:
6781
workflow: Java CI
6882
repo: grails/gorm-hibernate5
6983
ref: ${{ steps.extract_branch.outputs.value }}
7084
token: ${{ secrets.GH_TOKEN }}
71-
- name: Invoke the Java CI workflow in GORM Hibernate6
72-
uses: benc-uk/[email protected]
85+
- name: "📡 Invoke the Java CI workflow in GORM Hibernate6"
86+
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
7387
with:
7488
workflow: Java CI
7589
repo: grails/gorm-hibernate6
7690
ref: ${{ steps.extract_branch.outputs.value }}
7791
token: ${{ secrets.GH_TOKEN }}
78-
- name: Invoke the Java CI workflow in GORM MongoDB
79-
uses: benc-uk/[email protected]
92+
- name: "📡 Invoke the Java CI workflow in GORM MongoDB"
93+
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
8094
with:
8195
workflow: Java CI
8296
repo: grails/gorm-mongodb
8397
ref: ${{ steps.extract_branch.outputs.value }}
8498
token: ${{ secrets.GH_TOKEN }}
8599
inputs: ${{ steps.dispatch_message.outputs.value }}
86-
- name: Invoke the Java CI workflow in GORM Neo4j
87-
uses: benc-uk/[email protected]
100+
- name: "📡 Invoke the Java CI workflow in GORM Neo4j"
101+
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
88102
with:
89103
workflow: Java CI
90104
repo: grails/gorm-neo4j

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

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ on:
99
workflow_dispatch:
1010
permissions:
1111
contents: read
12+
packages: read
1213
jobs:
1314
build_groovy:
14-
runs-on: ubuntu-latest
15+
name: "Build Groovy"
16+
runs-on: ubuntu-24.04
1517
outputs:
1618
groovyVersion: ${{ steps.groovy-version.outputs.value }}
1719
steps:
1820
- name: "☕️ Setup JDK"
1921
uses: actions/setup-java@v4
2022
with:
21-
distribution: liberica
2223
java-version: 17
24+
distribution: liberica
2325
- name: "🗄️ Cache local Maven repository"
2426
uses: actions/cache@v4
2527
with:
@@ -45,8 +47,8 @@ jobs:
4547
- name: "🐘 Setup Gradle"
4648
uses: gradle/actions/setup-gradle@v4
4749
with:
48-
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
49-
- name: "📝 Store Groovy version to use when building this project"
50+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
51+
- name: "📝 Store Groovy version to use when building the project"
5052
id: groovy-version
5153
run: |
5254
cd groovy
@@ -68,27 +70,20 @@ jobs:
6870
run: |
6971
echo "VALUE<<EOF" >> $GITHUB_OUTPUT
7072
echo "def isAuthenticated = System.getenv('DEVELOCITY_ACCESS_KEY') != null" >> $GITHUB_OUTPUT
71-
echo "def isBuildCacheAuthenticated =" >> $GITHUB_OUTPUT
72-
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_USER') != null &&" >> $GITHUB_OUTPUT
73-
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_KEY') != null" >> $GITHUB_OUTPUT
74-
echo "" >> $GITHUB_OUTPUT
7573
echo "develocity {" >> $GITHUB_OUTPUT
7674
echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT
7775
echo " buildScan {" >> $GITHUB_OUTPUT
76+
echo " tag('groovy')" >> $GITHUB_OUTPUT
77+
echo " tag('grails-datamapping')" >> $GITHUB_OUTPUT
7878
echo " publishing.onlyIf { isAuthenticated }" >> $GITHUB_OUTPUT
7979
echo " uploadInBackground = false" >> $GITHUB_OUTPUT
8080
echo " }" >> $GITHUB_OUTPUT
8181
echo "}" >> $GITHUB_OUTPUT
82-
echo "" >> $GITHUB_OUTPUT
8382
echo "buildCache {" >> $GITHUB_OUTPUT
8483
echo " local { enabled = false }" >> $GITHUB_OUTPUT
8584
echo " remote(develocity.buildCache) {" >> $GITHUB_OUTPUT
86-
echo " push = isBuildCacheAuthenticated" >> $GITHUB_OUTPUT
85+
echo " push = isAuthenticated" >> $GITHUB_OUTPUT
8786
echo " enabled = true" >> $GITHUB_OUTPUT
88-
echo " usernameAndPassword(" >> $GITHUB_OUTPUT
89-
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_USER') ?: ''," >> $GITHUB_OUTPUT
90-
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_KEY') ?: ''" >> $GITHUB_OUTPUT
91-
echo " )" >> $GITHUB_OUTPUT
9287
echo " }" >> $GITHUB_OUTPUT
9388
echo "}" >> $GITHUB_OUTPUT
9489
echo "" >> $GITHUB_OUTPUT
@@ -105,42 +100,37 @@ jobs:
105100
# Add Develocity setup related configuration after line no 22 in gradle/build-scans.gradle
106101
echo "${{ steps.develocity-conf-2.outputs.value }}" | sed -i -e "22r /dev/stdin" gradle/build-scans.gradle
107102
- name: "🔨 Publish Groovy to local maven repository (no docs)"
108-
env:
109-
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
110-
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
111-
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
112103
run: |
113104
cd groovy
114105
./gradlew pTML -x groovydoc -x javadoc -x javadocAll -x groovydocAll -x asciidoc -x docGDK
115106
116107
build_project:
117-
needs: [build_groovy]
108+
name: "Build Project"
109+
needs: build_groovy
118110
runs-on: ubuntu-latest
119111
steps:
120112
- name: "📥 Checkout project"
121113
uses: actions/checkout@v4
122114
- name: "☕️ Setup JDK"
123115
uses: actions/setup-java@v4
124116
with:
125-
distribution: liberica
126117
java-version: 17
118+
distribution: liberica
127119
- name: "🐘 Setup Gradle"
128120
uses: gradle/actions/setup-gradle@v4
129121
with:
130-
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
122+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
131123
- name: "🗄️ Restore local Maven repository from cache"
132124
uses: actions/cache@v4
133125
with:
134126
path: ~/.m2/repository
135127
key: cache-local-maven-${{ github.sha }}
136128
- name: "🪶 Add mavenLocal repository to build"
137129
run: sed -i 's|// mavenLocal() // Keep|mavenLocal() // Keep|' build.gradle
138-
- name: "🔨 Build and test project using the locally built Groovy snapshot"
130+
- name: "🔨 Build and test the project using the locally built Groovy snapshot"
139131
env:
140-
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
141-
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
142132
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
143133
run: >
144-
./gradlew build
134+
./gradlew build --continue
145135
-PgroovyVersion=${{needs.build_groovy.outputs.groovyVersion}}
146-
-x groovydoc
136+
-x groovydoc
Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changelog
1+
name: "Release Drafter"
22
on:
33
issues:
44
types: [closed,reopened]
@@ -8,42 +8,15 @@ on:
88
pull_request:
99
types: [opened, reopened, synchronize]
1010
pull_request_target:
11-
types: [opened, reopened, synchronize]
11+
types: [opened, reopened, synchronize]
1212
workflow_dispatch:
1313
jobs:
14-
release_notes:
14+
update_release_draft:
15+
permissions:
16+
contents: read # limit to read access
1517
runs-on: ubuntu-latest
1618
steps:
17-
- uses: actions/checkout@v4
18-
- name: Check if it has release drafter config file
19-
id: check_release_drafter
20-
run: |
21-
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
22-
echo "has_release_drafter=${has_release_drafter}" >> $GITHUB_OUTPUT
23-
- name: Extract branch name
24-
id: extract_branch
25-
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
26-
# If it has release drafter:
27-
- uses: release-drafter/release-drafter@v6
28-
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
19+
- name: "📝 Update Release Draft"
20+
uses: release-drafter/release-drafter@v6
2921
env:
3022
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
31-
# Otherwise:
32-
- name: Export Gradle Properties
33-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
34-
uses: grails/github-actions/export-gradle-properties@main
35-
- uses: grails/github-actions/release-notes@main
36-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
37-
id: release_notes
38-
with:
39-
token: ${{ secrets.GH_TOKEN }}
40-
- uses: ncipollo/release-action@v1
41-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
42-
with:
43-
allowUpdates: true
44-
commit: ${{ steps.release_notes.outputs.current_branch }}
45-
draft: true
46-
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
47-
tag: v${{ steps.release_notes.outputs.next_version }}
48-
bodyFile: CHANGELOG.md
49-
token: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)