Preparing for release

This commit is contained in:
Julien Lengrand-Lambert
2025-05-16 22:06:02 +02:00
parent 57e771ffb0
commit 72722a8977
4 changed files with 67 additions and 1 deletions

26
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
# .github/workflows/publish.yml
name: Publish
on:
release:
types: [released, prereleased]
jobs:
publish:
name: Release build and publish
runs-on: macOS-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Publish to MavenCentral
run: ./gradlew publishToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}

1
.idea/gradle.xml generated
View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>

3
build.gradle.kts Normal file
View File

@@ -0,0 +1,3 @@
plugins {
kotlin("jvm") version "2.1.21" apply false
}

View File

@@ -1,5 +1,8 @@
import com.vanniktech.maven.publish.SonatypeHost
plugins {
kotlin("jvm") version "2.1.21"
id("com.vanniktech.maven.publish") version "0.30.0"
}
group = "fr.lengrand"
@@ -29,7 +32,40 @@ tasks.jar {
}
}
kotlin {
jvmToolchain(23)
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
coordinates(group.toString(), "opengraphkt", version.toString())
pom {
name = "OpenGraphKt"
description = "A minimalist Kotlin library to work with the Open Graph protocol."
inceptionYear = "2025"
url = "https://github.com/jlengrand/OpenGraphKt"
licenses {
license {
name = "The MIT License"
url = "https://mit-license.org/"
distribution = "https://mit-license.org/"
}
}
developers {
developer {
id = "jlengrand"
name = "Julien Lengrand-Lambert"
url = "https://github.com/jlengrand"
}
}
scm {
url = "https://github.com/jlengrand/OpenGraphKt"
connection = "scm:git:git://github.com/jlengrand/OpenGraphKt.git"
developerConnection = "scm:git:ssh://git@github.com/jlengrand/OpenGraphKt.git"
}
}
}