Publish to OSSRH instead of Bintray (#4)
This commit is contained in:
parent
cdfceb0783
commit
217116b819
24
.github/workflows/publish.yml
vendored
24
.github/workflows/publish.yml
vendored
@ -1,24 +0,0 @@
|
|||||||
name: Publish Artifacts
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 1.8
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 1.8
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Publish Artifacts
|
|
||||||
run: ./gradlew api:bintrayUpload client:bintrayUpload -DlibraryVersion=${GITHUB_REF##*/}
|
|
||||||
env:
|
|
||||||
BINTRAY_USER : ${{ secrets.BINTRAY_USER }}
|
|
||||||
BINTRAY_KEY : ${{ secrets.BINTRAY_KEY }}
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -31,3 +31,6 @@ hs_err_pid*
|
|||||||
|
|
||||||
# Ignore Gradle build output directory
|
# Ignore Gradle build output directory
|
||||||
build
|
build
|
||||||
|
|
||||||
|
# ignore secrets in gradle.properties
|
||||||
|
gradle.properties
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'maven'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'signing'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'org.projectlombok:lombok:1.18.12'
|
compileOnly 'org.projectlombok:lombok:1.18.12'
|
||||||
@ -13,6 +13,7 @@ ext {
|
|||||||
|
|
||||||
version = libraryVersion
|
version = libraryVersion
|
||||||
group = 'com.theokanning.openai-gpt3-java'
|
group = 'com.theokanning.openai-gpt3-java'
|
||||||
|
archivesBaseName = "api"
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
@ -24,18 +25,32 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
|
|||||||
from javadoc.destinationDir
|
from javadoc.destinationDir
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
artifacts {
|
||||||
publications {
|
archives javadocJar, sourcesJar
|
||||||
ApiPublication(MavenPublication) {
|
}
|
||||||
from components.java
|
|
||||||
artifact sourcesJar
|
signing {
|
||||||
artifact javadocJar
|
sign configurations.archives
|
||||||
groupId project.group
|
}
|
||||||
artifactId 'api'
|
|
||||||
version libraryVersion
|
uploadArchives {
|
||||||
pom {
|
repositories {
|
||||||
description = 'POJOs for the OpenAI GPT-3 API'
|
mavenDeployer {
|
||||||
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||||
|
|
||||||
|
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.project {
|
||||||
name = 'api'
|
name = 'api'
|
||||||
|
packaging 'jar'
|
||||||
|
|
||||||
|
description = 'POJOs for the OpenAI GPT-3 API'
|
||||||
url = 'https://github.com/theokanning/openai-java'
|
url = 'https://github.com/theokanning/openai-java'
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
@ -45,6 +60,8 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
scm {
|
scm {
|
||||||
|
connection "https://github.com/theokanning/openai-java.git"
|
||||||
|
developerConnection "https://github.com/theokanning/openai-java.git"
|
||||||
url = "https://github.com/theokanning/openai-java"
|
url = "https://github.com/theokanning/openai-java"
|
||||||
}
|
}
|
||||||
licenses {
|
licenses {
|
||||||
@ -58,20 +75,3 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = System.getenv("BINTRAY_USER")
|
|
||||||
key = System.getenv("BINTRAY_KEY")
|
|
||||||
|
|
||||||
publications = ['ApiPublication']
|
|
||||||
pkg {
|
|
||||||
repo = 'openai-gpt3-java'
|
|
||||||
name = 'api'
|
|
||||||
vcsUrl = 'https://github.com/TheoKanning/openai-java.git'
|
|
||||||
licenses = ["MIT"]
|
|
||||||
publish = false
|
|
||||||
version {
|
|
||||||
name = libraryVersion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +1,11 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'maven'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'signing'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(":api")
|
api project(":api")
|
||||||
@ -15,6 +15,7 @@ ext {
|
|||||||
|
|
||||||
version = libraryVersion
|
version = libraryVersion
|
||||||
group = 'com.theokanning.openai-gpt3-java'
|
group = 'com.theokanning.openai-gpt3-java'
|
||||||
|
archivesBaseName = "client"
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
@ -26,18 +27,32 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
|
|||||||
from javadoc.destinationDir
|
from javadoc.destinationDir
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
artifacts {
|
||||||
publications {
|
archives javadocJar, sourcesJar
|
||||||
ClientPublication(MavenPublication) {
|
}
|
||||||
from components.java
|
|
||||||
artifact sourcesJar
|
signing {
|
||||||
artifact javadocJar
|
sign configurations.archives
|
||||||
groupId project.group
|
}
|
||||||
artifactId 'client'
|
|
||||||
version libraryVersion
|
uploadArchives {
|
||||||
pom {
|
repositories {
|
||||||
description = 'Basic retrofit client for OpenAI\'s GPT-3 API'
|
mavenDeployer {
|
||||||
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||||
|
|
||||||
|
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.project {
|
||||||
name = 'client'
|
name = 'client'
|
||||||
|
packaging 'jar'
|
||||||
|
|
||||||
|
description = 'Basic retrofit client for OpenAI\'s GPT-3 API'
|
||||||
url = 'https://github.com/theokanning/openai-java'
|
url = 'https://github.com/theokanning/openai-java'
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
@ -47,6 +62,8 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
scm {
|
scm {
|
||||||
|
connection "https://github.com/theokanning/openai-java.git"
|
||||||
|
developerConnection "https://github.com/theokanning/openai-java.git"
|
||||||
url = "https://github.com/theokanning/openai-java"
|
url = "https://github.com/theokanning/openai-java"
|
||||||
}
|
}
|
||||||
licenses {
|
licenses {
|
||||||
@ -60,20 +77,3 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = System.getenv("BINTRAY_USER")
|
|
||||||
key = System.getenv("BINTRAY_KEY")
|
|
||||||
|
|
||||||
publications = ['ClientPublication']
|
|
||||||
pkg {
|
|
||||||
repo = 'openai-gpt3-java'
|
|
||||||
name = 'client'
|
|
||||||
vcsUrl = 'https://github.com/TheoKanning/openai-java.git'
|
|
||||||
licenses = ["MIT"]
|
|
||||||
publish = false
|
|
||||||
version {
|
|
||||||
name = libraryVersion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user