Skip to content

Commit

Permalink
update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Sep 20, 2024
1 parent 650aef5 commit 5dfbca4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ jobs:
id: build-libs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.PGP_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.PGP_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PGP_SIGNING_KEY_PASSWORD }}
run: |
./gradlew build test publish
./gradlew build test publish publishAndReleaseToMavenCentral
git commit -am 'Release version ${{ inputs.version }}'
git tag -a '${{ inputs.version }}' -m 'Release version ${{ inputs.version }}'
echo 'dev' > version.txt
Expand Down
42 changes: 42 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.vanniktech.maven.publish.SonatypeHost

buildscript {
repositories {
mavenLocal()
Expand All @@ -12,6 +14,7 @@ plugins {
id "maven-publish"
id "java"
id 'ch.netzwerg.release' version '1.2.5'
id "com.vanniktech.maven.publish" version "0.29.0"
}

group = 'org.reactivecouchbase.json'
Expand Down Expand Up @@ -63,6 +66,45 @@ artifacts {
archives javadocJar
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT)
// or when publishing to https://s01.oss.sonatype.org
// publishToMavenCentral(SonatypeHost.S01)
// or when publishing to https://central.sonatype.com/
// publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)

signAllPublications()

coordinates("org.reactivecouchbase.json", "json-lib", "${project.version}")

pom {
name = "JSON lib"
description = "A JSON library highly inspired and copied from @mandubian (Pascal Voitot) Json lib for Play 2 Scala"
inceptionYear = "2018"
url = "https://github.com/mathieuancelin/json-lib/"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "mathieuancelin"
name = "Mathieu ANCELIN"
url = "https://github.com/mathieuancelin/"
}
}
scm {
url = "https://github.com/mathieuancelin/json-lib/"
connection = "scm:git:git://github.com/mathieuancelin/json-lib.git"
developerConnection = "scm:git:ssh://[email protected]/mathieuancelin/json-lib.git"
}
}

}

publishing {
publications {
mavenPublication(MavenPublication) {
Expand Down

0 comments on commit 5dfbca4

Please sign in to comment.