Skip to content

Commit 0dabc0d

Browse files
committed
Add GitHub CI/CD workflows and enable signing
- Add CI workflow using shared-workflows for build and release - Add dependabot workflow for automated dependency updates - Add nightly build workflow for regular health checks - Configure dependabot for Gradle dependencies with grouping - Enable signing configuration matching other LSD projects - Ready for automated Maven Central publishing via CI
1 parent 2110e4a commit 0dabc0d

File tree

5 files changed

+66
-6
lines changed

5 files changed

+66
-6
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gradle"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
commit-message:
8+
prefix: "fix"
9+
groups:
10+
runtime-dependencies:
11+
patterns:
12+
- "org.jetbrains.kotlin:kotlin-gradle-plugin:*"
13+
- "org.jetbrains.dokka:dokka-gradle-plugin:*"
14+
- "io.github.gradle-nexus:publish-plugin:*"
15+
- "com.palantir.gradle.gitversion:gradle-git-version:*"
16+
- "org.springframework.boot:spring-boot-gradle-plugin:*"
17+
- "io.spring.gradle:dependency-management-plugin:*"
18+
- "org.jetbrains.kotlin:kotlin-allopen:*"

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a Gradle project then perform an automated release
2+
# For more information see:
3+
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
4+
# https://github.com/marketplace/actions/action-for-semantic-release
5+
6+
name: CI
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
14+
jobs:
15+
build:
16+
uses: lsd-consulting/shared-workflows/.github/workflows/build.yml@main
17+
with:
18+
java-version: '17'
19+
codecov: true
20+
secrets: inherit
21+
release:
22+
needs: build
23+
uses: lsd-consulting/shared-workflows/.github/workflows/release.yml@main
24+
with:
25+
java-version: '17'
26+
secrets: inherit
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Merge dependabot PR
2+
on:
3+
pull_request_target:
4+
branches:
5+
- main
6+
jobs:
7+
pr-merge:
8+
uses: lsd-consulting/shared-workflows/.github/workflows/dependabot-merge.yml@main
9+
secrets: inherit

.github/workflows/nightly.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Nightly Build
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 2 * * *' # run at 2 AM UTC
6+
jobs:
7+
build:
8+
uses: lsd-consulting/shared-workflows/.github/workflows/build.yml@main
9+
with:
10+
java-version: '17'

build.gradle.kts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
`kotlin-dsl`
33
`maven-publish`
4-
// signing // Temporarily disabled for local testing
4+
signing
55
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
66
id("com.palantir.git-version") version "4.0.0"
77
}
@@ -95,21 +95,18 @@ publishing {
9595
}
9696
}
9797

98-
// Signing temporarily disabled for local testing
99-
/*
10098
signing {
10199
if (project.findProperty("signingKey") != null) {
102100
// Use in-memory ascii-armored keys
103-
val signingKey: String? by project
104-
val signingPassword: String? by project
101+
val signingKey: String? = findProperty("signingKey") as String?
102+
val signingPassword: String? = findProperty("signingPassword") as String?
105103
useInMemoryPgpKeys(signingKey, signingPassword)
106104
sign(publishing.publications)
107105
} else {
108106
// Use signing properties in ~/.gradle/gradle.properties
109107
sign(publishing.publications)
110108
}
111109
}
112-
*/
113110

114111
nexusPublishing {
115112
repositories {

0 commit comments

Comments
 (0)