Skip to content

Commit 10ad596

Browse files
authored
Merge pull request #6 from grails-plugins/2.0.x-release-drafter-renovate
Added release-drafter and renovate.json Updated .github actions to that of https://github.com/grails-plugins/grails-server-timing per suggestion from @jdaugherty
2 parents cb842cc + 5b1565f commit 10ad596

7 files changed

Lines changed: 501 additions & 103 deletions

File tree

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
# Gradle dependencies (root + all subprojects)
4+
- package-ecosystem: "gradle"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
labels:
10+
- "deps"
11+
open-pull-requests-limit: 10
12+
groups:
13+
gradle-dependencies:
14+
patterns:
15+
- "*"
16+
17+
# Gradle wrapper
18+
- package-ecosystem: "gradle"
19+
directory: "/gradle/wrapper"
20+
schedule:
21+
interval: "weekly"
22+
day: "monday"
23+
labels:
24+
- "deps"
25+
ignore:
26+
- dependency-name: "gradle"
27+
versions: [ ">= 9" ]
28+
29+
# GitHub Actions
30+
- package-ecosystem: "github-actions"
31+
directory: "/"
32+
schedule:
33+
interval: "weekly"
34+
day: "monday"
35+
labels:
36+
- "deps"
37+
groups:
38+
github-actions:
39+
patterns:
40+
- "*"

.github/release-drafter.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name-template: $RESOLVED_VERSION
2+
tag-template: v$RESOLVED_VERSION
3+
pull-request:
4+
title-templates:
5+
fix: '🐛 $TITLE (#$NUMBER)'
6+
feat: '🚀 $TITLE (#$NUMBER)'
7+
default: '$TITLE (#$NUMBER)'
8+
autolabeler:
9+
- label: 'bug'
10+
branch:
11+
- '/fix\/.+/'
12+
title:
13+
- '/fix/i'
14+
- label: 'improvement'
15+
branch:
16+
- '/improv\/.+/'
17+
title:
18+
- '/improv/i'
19+
- label: 'feature'
20+
branch:
21+
- '/feature\/.+/'
22+
title:
23+
- '/feat/i'
24+
- label: 'documentation'
25+
branch:
26+
- '/docs\/.+/'
27+
title:
28+
- '/docs/i'
29+
- label: 'maintenance'
30+
branch:
31+
- '/(chore|refactor|style|test|ci|perf|build)\/.+/'
32+
title:
33+
- '/(chore|refactor|style|test|ci|perf|build)/i'
34+
- label: 'chore'
35+
branch:
36+
- '/chore\/.+/'
37+
title:
38+
- '/chore/i'
39+
- label: 'refactor'
40+
branch:
41+
- '/refactor\/.+/'
42+
title:
43+
- '/refactor/i'
44+
- label: 'style'
45+
branch:
46+
- '/style\/.+/'
47+
title:
48+
- '/style/i'
49+
- label: 'test'
50+
branch:
51+
- '/test\/.+/'
52+
title:
53+
- '/test/i'
54+
- label: 'ci'
55+
branch:
56+
- '/ci\/.+/'
57+
title:
58+
- '/ci/i'
59+
- label: 'perf'
60+
branch:
61+
- '/perf\/.+/'
62+
title:
63+
- '/perf/i'
64+
- label: 'build'
65+
branch:
66+
- '/build\/.+/'
67+
title:
68+
- '/build/i'
69+
- label: 'deps'
70+
branch:
71+
- '/deps\/.+/'
72+
title:
73+
- '/deps/i'
74+
- label: 'revert'
75+
branch:
76+
- '/revert\/.+/'
77+
title:
78+
- '/revert/i'
79+
categories:
80+
- title: '🚀 Features'
81+
labels:
82+
- 'feature'
83+
- "type: enhancement"
84+
- "type: new feature"
85+
- "type: major"
86+
- "type: minor"
87+
- title: '💡 Improvements'
88+
labels:
89+
- 'improvement'
90+
- "type: improvement"
91+
92+
- title: '🐛 Bug Fixes'
93+
labels:
94+
- 'fix'
95+
- 'bug'
96+
- "type: bug"
97+
- title: '📚 Documentation'
98+
labels:
99+
- 'docs'
100+
- title: '🔧 Maintenance'
101+
labels:
102+
- 'maintenance'
103+
- 'chore'
104+
- 'refactor'
105+
- 'style'
106+
- 'test'
107+
- 'ci'
108+
- 'perf'
109+
- 'build'
110+
- "type: ci"
111+
- "type: build"
112+
- title: '⏪ Reverts'
113+
labels:
114+
- 'revert'
115+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
116+
version-resolver:
117+
major:
118+
labels:
119+
- 'type: major'
120+
minor:
121+
labels:
122+
- 'type: minor'
123+
patch:
124+
labels:
125+
- 'type: patch'
126+
default: patch
127+
template: |
128+
## What's Changed
129+
130+
$CHANGES
131+
132+
## Contributors
133+
134+
$CONTRIBUTORS

.github/renovate.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
":semanticCommitTypeAll(deps)",
6+
"group:allNonMajor"
7+
],
8+
"labels": [
9+
"deps"
10+
],
11+
"schedule": [
12+
"before 6am on monday"
13+
],
14+
"gradle": {
15+
"enabled": true,
16+
"fileMatch": [
17+
"(^|/)build\\.gradle$",
18+
"(^|/)settings\\.gradle$",
19+
"(^|/)gradle\\.properties$",
20+
"build-logic/src/main/groovy/.*\\.gradle$"
21+
]
22+
},
23+
"gradle-wrapper": {
24+
"enabled": true
25+
},
26+
"github-actions": {
27+
"enabled": true
28+
},
29+
"packageRules": [
30+
{
31+
"description": "Group all Grails dependencies together",
32+
"matchPackagePatterns": [
33+
"^org\\.apache\\.grails"
34+
],
35+
"groupName": "grails"
36+
},
37+
{
38+
"description": "Group all Spring Boot dependencies together",
39+
"matchPackagePatterns": [
40+
"^org\\.springframework\\.boot"
41+
],
42+
"groupName": "spring-boot"
43+
},
44+
{
45+
"description": "Group all GitHub Actions updates together",
46+
"matchManagers": [
47+
"github-actions"
48+
],
49+
"groupName": "github-actions"
50+
},
51+
{
52+
"description": "Group all Spock/testing dependencies together",
53+
"matchPackagePatterns": [
54+
"^org\\.spockframework"
55+
],
56+
"groupName": "spock"
57+
},
58+
{
59+
"description": "Automerge minor and patch updates for dev dependencies",
60+
"matchUpdateTypes": [
61+
"minor",
62+
"patch"
63+
],
64+
"matchPackagePatterns": [
65+
"^com\\.adarshr:gradle-test-logger-plugin"
66+
],
67+
"automerge": true
68+
}
69+
],
70+
"ignoreDeps": []
71+
}

.github/workflows/ci.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: "CI"
2+
on:
3+
push:
4+
branches:
5+
- '[0-9]+.[0-9]+.x'
6+
- 'main'
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12+
jobs:
13+
build:
14+
name: "Build & Test"
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- name: "Output Agent IP" # in the event your agent has network issues, you can use this to debug
18+
run: curl -s https://api.ipify.org
19+
- name: "📥 Checkout repository"
20+
uses: actions/checkout@v6
21+
- name: "Export .sdkmanrc properties"
22+
uses: apache/grails-github-actions/export-gradle-properties@asf
23+
with:
24+
file: ".sdkmanrc"
25+
prefix: "SDKMANRC_"
26+
- name: "Determine Java Version"
27+
run: echo "SDKMANRC_java=${{ env.SDKMANRC_java }}" | sed 's/-.*//' >> $GITHUB_ENV
28+
- name: "☕️ Setup JDK"
29+
uses: actions/setup-java@v5
30+
with:
31+
distribution: liberica
32+
java-version: ${{ env.SDKMANRC_java }}
33+
- name: 'Ensure Common Build Date' # to ensure a reproducible build
34+
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
35+
- name: "🐘 Setup Gradle"
36+
uses: gradle/actions/setup-gradle@v5
37+
- name: "🔨 Build project without tests"
38+
if: ${{ contains(github.event.head_commit.message, '[skip tests]') }}
39+
run: >
40+
./gradlew build
41+
--continue
42+
--stacktrace
43+
-PskipTests
44+
-PskipCodeStyle
45+
- name: "🔨 Build project with tests"
46+
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
47+
run: >
48+
./gradlew build
49+
--continue
50+
--stacktrace
51+
--rerun-tasks
52+
-PskipCodeStyle
53+
publish:
54+
# only run the publish task on this repo instead of forks
55+
if: github.repository_owner == 'grails-plugins' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
56+
needs: [ build ]
57+
runs-on: ubuntu-24.04
58+
steps:
59+
- name: "Output Agent IP" # in the event your agent has network issues, you can use this to debug
60+
run: curl -s https://api.ipify.org
61+
- name: "📥 Checkout repository"
62+
uses: actions/checkout@v6
63+
- name: "Export .sdkmanrc properties"
64+
uses: apache/grails-github-actions/export-gradle-properties@asf
65+
with:
66+
file: ".sdkmanrc"
67+
prefix: "SDKMANRC_"
68+
- name: "Determine Java Version"
69+
run: echo "SDKMANRC_java=${{ env.SDKMANRC_java }}" | sed 's/-.*//' >> $GITHUB_ENV
70+
- name: "☕️ Setup JDK"
71+
uses: actions/setup-java@v5
72+
with:
73+
distribution: liberica
74+
java-version: ${{ env.SDKMANRC_java }}
75+
- name: 'Ensure Common Build Date' # to ensure a reproducible build
76+
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
77+
- name: "🐘 Setup Gradle"
78+
uses: gradle/actions/setup-gradle@v5
79+
- name: "📤 Publish Gradle Snapshot Artifacts"
80+
env:
81+
GRAILS_PUBLISH_RELEASE: 'false'
82+
MAVEN_PUBLISH_URL: 'https://central.sonatype.com/repository/maven-snapshots/'
83+
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
84+
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
85+
working-directory: './plugin'
86+
run: >
87+
../gradlew publish
88+
--no-build-cache
89+
--rerun-tasks
90+
- name: "📜 Generate Documentation"
91+
if: success()
92+
run: ./gradlew docs
93+
- name: "🚀 Publish to Github Pages"
94+
if: success()
95+
uses: apache/grails-github-actions/deploy-github-pages@asf
96+
env:
97+
GRADLE_PUBLISH_RELEASE: 'false'
98+
SOURCE_FOLDER: build/docs

.github/workflows/gradle.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)