diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d1f841d..e66fba1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -35,10 +35,10 @@ jobs:
- name: Build with Gradle
run: ./gradlew build
- - name: Publish with Gradle
+ - name: Publish to GitHub Packages with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./gradlew publish
+ run: ./gradlew publishAllPublicationsToGitHubPackagesRepository
- name: Cleanup Gradle cache
run: |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 00a657b..2487061 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,10 +4,14 @@ emotionml-checker-java Changelog
[Unreleased]
------------
+[v1.2.1] (2022-01-07)
+-------------------
+
### Changes
- Upgraded Gradle to v7.3.3
- Upgraded test dependencies
+- Released to Maven Central
[v1.2] (2021-12-22)
-------------------
@@ -28,6 +32,7 @@ Release published to Bintray, indexed in JCenter
Initial release
[Unreleased]: https://github.com/marytts/emotionml-checker-java
+[v1.2.1]: https://github.com/marytts/emotionml-checker-java/releases/tag/v1.2.1
[v1.2]: https://github.com/marytts/emotionml-checker-java/releases/tag/v1.2
[v1.1]: https://github.com/marytts/emotionml-checker-java/releases/tag/v1.1
[v1.0]: https://github.com/marytts/emotionml-checker-java/releases/tag/emotionml-checker-java-1.0
diff --git a/README.md b/README.md
index e5b3704..a12bdb0 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,43 @@ A generic implementation of EmotionML checks, in Java.
Dependency resolution
---------------------
+### Releases
+
+As of v1.2.1, release artifacts for this component is available via Maven Central.
+
+#### Gradle
+
+Add this to your `build.gradle`:
+
+```gradle
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation group: 'de.dfki.mary', name: 'emotionml-checker-java', version: '1.2.1'
+}
+```
+
+#### Maven
+
+Add this to your `pom.xml`:
+
+```xml
+
+ de.dfki.mary
+ emotionml-checker-java
+ 1.2.1
+
+```
+
+### Snapshots
+
+Snapshot releases are hosted via GitHub Packages.
+
Ensure you have a valid GitHub personal access token with `read:packages` scope.
-### Gradle
+#### Gradle
Configure your GitHub usename and token as Gradle properties `GitHubPackagesUsername` and `GitHubPackagesPassword`, respectively.
@@ -33,11 +67,11 @@ repositories {
}
dependencies {
- implementation group: 'de.dfki.mary', name: 'emotionml-checker-java', version: '1.2'
+ implementation group: 'de.dfki.mary', name: 'emotionml-checker-java', version: '1.3-SNAPSHOT'
}
```
-### Maven
+#### Maven
Configure your Maven `settings.xml` to [authenticate to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry).
@@ -47,7 +81,7 @@ Then, add this to your `pom.xml`:
de.dfki.mary
emotionml-checker-java
- 1.2
+ 1.3-SNAPSHOT
```
diff --git a/build.gradle b/build.gradle
index 75cb1c4..0f96bb9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,12 +2,15 @@ plugins {
id 'java-library'
id 'application'
id 'maven-publish'
+ id 'signing'
}
group 'de.dfki.mary'
version '1.3-SNAPSHOT'
description 'A generic implementation of EmotionML checks, in Java'
+ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
+
repositories {
mavenCentral()
}
@@ -47,10 +50,12 @@ publishing {
pom {
name = project.name
description = project.description
+ def projectUrl = 'https://github.com/marytts/emotionml-checker-java'
+ url = projectUrl
licenses {
license {
name = 'Creative Commons Zero v1.0 Universal'
- url = 'https://spdx.org/licenses/CC0-1.0.html'
+ url = 'https://creativecommons.org/publicdomain/zero/1.0/'
}
}
developers {
@@ -58,6 +63,15 @@ publishing {
id = 'marc1s'
name = 'Marc Schröder'
}
+ developer {
+ id = 'psibre'
+ name = 'Ingmar Steiner'
+ }
+ }
+ scm {
+ connection = "scm:git:${projectUrl}.git"
+ developerConnection = 'scm:git:ssh://github.com:marytts/emotionml-checker-java.git'
+ url = "$projectUrl/tree/master"
}
}
}
@@ -71,5 +85,17 @@ publishing {
password = System.env.GITHUB_TOKEN
}
}
+ if (isReleaseVersion) {
+ maven {
+ name = 'OSSRH'
+ url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
+ credentials(PasswordCredentials)
+ }
+ }
}
}
+
+signing {
+ required { isReleaseVersion }
+ sign publishing.publications.mavenJava
+}