Skip to content

Commit 6d7845b

Browse files
committed
Migrate from Groovy to Kotlin 2nd try
1 parent 7c6988d commit 6d7845b

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

.github/workflows/build_and_release_github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
run: ./gradlew clean build
3939

4040
- name: Release package
41-
run: ./gradlew publish
41+
run: ./gradlew githubRelease
4242
env:
4343
RELEASE_GRADLE_PLUGIN_TOKEN: ${{ secrets.RELEASE_GRADLE_PLUGIN_TOKEN }}

build.gradle.kts

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("com.gradleup.shadow") version "8.3.6"
3-
id("maven-publish")
3+
id("com.github.breadmoirai.github-release") version "2.5.2"
44
id("com.palantir.git-version") version "3.2.0"
55
id("java")
66
id("java-library")
@@ -104,21 +104,25 @@ tasks.withType<Javadoc> {
104104
}
105105
}
106106

107-
publishing {
108-
publications {
109-
create<MavenPublication>("default") {
110-
from(components["java"])
111-
}
112-
}
113-
114-
repositories {
115-
maven {
116-
name = "GitHubPackages"
117-
url = uri("https://maven.pkg.github.com/purejava/keepassxc-cryptomator")
118-
credentials {
119-
username = System.getenv("GITHUB_ACTOR")
120-
password = releaseGradlePluginToken
121-
}
107+
githubRelease {
108+
token(releaseGradlePluginToken)
109+
tagName = project.version.toString()
110+
releaseName = project.version.toString()
111+
targetCommitish = "main"
112+
draft = true
113+
body = """
114+
[![Downloads](https://img.shields.io/github/downloads/purejava/keepassxc-cryptomator/latest/keepassxc-cryptomator-${project.version}.jar)](https://github.com/purejava/keepassxc-cryptomator/releases/latest/download/keepassxc-cryptomator-${project.version}.jar)
115+
116+
- xxx
117+
""".trimIndent()
118+
releaseAssets.from(
119+
fileTree("${layout.buildDirectory.get()}/libs") {
120+
include(
121+
"keepassxc-cryptomator-${project.version}.jar",
122+
"keepassxc-cryptomator-${project.version}.jar.asc",
123+
"keepassxc-cryptomator-${project.version}-sources.jar",
124+
"keepassxc-cryptomator-${project.version}-sources.jar.asc"
125+
)
122126
}
123-
}
127+
)
124128
}

0 commit comments

Comments
 (0)