Skip to content

Commit fab5ab1

Browse files
committed
build: prepare releae 6.1.2
1 parent 222cc09 commit fab5ab1

File tree

4 files changed

+64
-54
lines changed

4 files changed

+64
-54
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,37 @@
77
# To get a newer version, you will need to update the SHA.
88
# You can also reference a tag or branch, but the action may change without warning.
99

10-
name: Publish package to the Maven Central Repository
10+
name: Release
1111
on:
12-
release:
13-
types: [created]
12+
workflow_dispatch:
1413
jobs:
15-
publish:
14+
release:
1615
runs-on: ubuntu-24.04-arm
1716
steps:
1817
- uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0 # Required for JReleaser to access full commit history
1920
- name: Set up Java
2021
uses: actions/setup-java@v5
2122
with:
2223
distribution: 'temurin'
23-
java-version: '21'
24+
java-version: '24'
2425
- name: Setup Gradle
25-
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
26-
- name: Publish package
27-
run: ./gradlew publish
26+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
27+
- name: Run JReleaser
28+
run: ./gradlew publish jreleaserRelease
2829
env:
29-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
30-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
31-
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
32-
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_TOKEN }}
30+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
32+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
33+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
34+
JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
35+
JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
36+
- name: JReleaser release output
37+
if: always()
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: jreleaser-release
41+
path: |
42+
build/jreleaser/trace.log
43+
build/jreleaser/output.properties

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [6.1.2] - 2025-09-09
8+
### Changed
9+
- Update dependency to logback 1.5.18
10+
711
## [6.1.1] - 2025-01-03
812
### Changed
913
- Update dependency to logback 1.5.15

build.gradle.kts

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ plugins {
66
checkstyle
77
jacoco
88
alias(libs.plugins.spotbugs)
9+
alias(libs.plugins.jreleaser)
910
}
1011

1112
group = "de.siegmar"
12-
version = "6.1.1"
13+
version = "6.1.2"
1314

1415
java {
1516
toolchain {
@@ -70,52 +71,45 @@ tasks.jacocoTestCoverageVerification {
7071
}
7172
}
7273

73-
publishing {
74-
publications {
75-
create<MavenPublication>("maven") {
76-
artifactId = "logback-gelf"
77-
from(components["java"])
78-
79-
pom {
80-
name = "Logback GELF"
81-
description = "Logback appender for sending GELF messages with zero additional dependencies."
82-
url = "https://github.com/osiegmar/logback-gelf"
83-
licenses {
84-
license {
85-
name = "GNU Lesser General Public License version 2.1"
86-
url = "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt"
87-
}
88-
}
89-
scm {
90-
url = "https://github.com/osiegmar/logback-gelf"
91-
connection = "scm:git:https://github.com/osiegmar/logback-gelf.git"
92-
}
93-
developers {
94-
developer {
95-
id = "osiegmar"
96-
name = "Oliver Siegmar"
97-
98-
}
74+
jreleaser {
75+
project {
76+
gitRootSearch.set(true)
77+
name.set("Logback GELF")
78+
description.set("Logback appender for sending GELF messages with zero additional dependencies.")
79+
authors.set(listOf("Oliver Siegmar"))
80+
license.set("LGPL-2.1")
81+
links {
82+
homepage.set("https://github.com/osiegmar/logback-gelf")
83+
license.set("https://opensource.org/license/lgpl-2-1")
84+
}
85+
}
86+
signing {
87+
active.set(org.jreleaser.model.Active.ALWAYS)
88+
armored.set(true)
89+
}
90+
deploy {
91+
maven {
92+
mavenCentral {
93+
create("sonatype") {
94+
active.set(org.jreleaser.model.Active.ALWAYS)
95+
url.set("https://central.sonatype.com/api/v1/publisher")
96+
stagingRepositories.add("build/staging-deploy")
9997
}
10098
}
10199
}
102100
}
103-
repositories {
104-
maven {
105-
name = "ossrh"
106-
credentials(PasswordCredentials::class)
107-
url = if (version.toString().endsWith("SNAPSHOT")) {
108-
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
109-
} else {
110-
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
101+
release {
102+
github {
103+
changelog {
104+
formatted.set(org.jreleaser.model.Active.ALWAYS)
105+
preset.set("conventional-commits")
106+
append {
107+
enabled.set(true)
108+
target.set(file("CHANGELOG.md"))
109+
title = "## [{{tagName}}] - {{#f_now}}YYYY-MM-dd{{/f_now}}"
110+
content = "{{changelogTitle}}\n{{changelogContent}}"
111+
}
111112
}
112113
}
113114
}
114115
}
115-
116-
signing {
117-
val signingKey: String? by project
118-
val signingPassword: String? by project
119-
useInMemoryPgpKeys(signingKey, signingPassword)
120-
sign(publishing.publications["maven"])
121-
}

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ awaitility = { module = "org.awaitility:awaitility", version = "4.3.0" }
1010

1111
[plugins]
1212
spotbugs = { id = "com.github.spotbugs", version = "6.3.0" }
13+
jreleaser = { id = "org.jreleaser", version = "1.20.0" }

0 commit comments

Comments
 (0)