5 Commits

Author SHA1 Message Date
Theo Kanning fe48e8cfc3 Add sources and javadocs jars to published artifacts
JCenter requires these
2020-10-06 18:14:35 -05:00
Theo Kanning a893f80b75 Use release tag without prefixes
https://github.community/t/getting-release-details-from-within-an-actions-run/17552
Also fixed BINTRAY_KEY secret
2020-10-05 19:02:04 -05:00
Theo Kanning 4141fb942a Send library version via command line 2020-10-05 18:49:57 -05:00
Theo Kanning 3fdc96d6a5 Fix publish.yml
Now it will call the correct task and only fire once per release
2020-10-05 18:35:44 -05:00
Theo Kanning 4e070027c4 Add github action to publish artifacts after a release 2020-10-05 18:26:56 -05:00
4 changed files with 50 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
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 }}
+13 -1
View File
@@ -8,16 +8,28 @@ dependencies {
}
ext {
libraryVersion = '0.2.0'
libraryVersion = System.getProperty("libraryVersion")
}
version = libraryVersion
group = 'com.theokanning.openai-gpt3-java'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
ApiPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId 'api'
version libraryVersion
-1
View File
@@ -7,7 +7,6 @@ buildscript {
}
}
allprojects {
repositories {
jcenter()
+13 -1
View File
@@ -10,16 +10,28 @@ dependencies {
}
ext {
libraryVersion = '0.2.0'
libraryVersion = System.getProperty("libraryVersion")
}
version = libraryVersion
group = 'com.theokanning.openai-gpt3-java'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
ClientPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId 'client'
version libraryVersion