WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
File tree Expand file tree Collapse file tree 5 files changed +16
-58
lines changed
Expand file tree Collapse file tree 5 files changed +16
-58
lines changed Original file line number Diff line number Diff line change 2626 needs : tagpr
2727 if : needs.tagpr.outputs.tag != '' || github.event_name == 'workflow_dispatch'
2828 runs-on : ubuntu-latest
29- permissions :
30- contents : read
31- packages : write
3229 steps :
3330 - uses : actions/checkout@v4
3431 - name : Set up JDK 21
4037 uses : gradle/actions/setup-gradle@v4
4138 - name : Test
4239 run : ./gradlew test
43- - name : Publish to GitHub Packages
44- run : ./gradlew publish
40+ - name : Publish to Maven Central
41+ run : ./gradlew publishAllPublicationsToMavenCentralRepository
4542 env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
44+ ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
45+ ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
46+ ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
Original file line number Diff line number Diff line change 11apply plugin : ' java-library'
2+ apply plugin : " com.vanniktech.maven.publish"
23
34dependencies {
45 api libs. jacksonAnnotations
Original file line number Diff line number Diff line change 11plugins {
2- id ' maven- publish'
2+ id " com.vanniktech. maven. publish" version " 0.34.0 "
33}
44
5- subprojects {
6- apply plugin : ' maven-publish'
7-
8- plugins. withId(' java' ) {
9- publishing {
10- repositories {
11- maven {
12- name = " GitHubPackages"
13- url = " https://maven.pkg.github.com/launchableinc/openai-java"
14- credentials {
15- username = System . getenv(" GITHUB_ACTOR" )
16- password = System . getenv(" GITHUB_TOKEN" )
17- }
18- }
19- }
20-
21- publications {
22- maven(MavenPublication ) {
23- from components. java
24-
25- groupId = ' com.launchableinc.openai-java'
26- artifactId = project. name
27- version = project. VERSION_NAME
28-
29- pom {
30- name = ' OpenAI Java Client'
31- description = ' Java client library for OpenAI API'
32- url = ' https://github.com/launchableinc/openai-java'
33-
34- licenses {
35- license {
36- name = ' The MIT License'
37- url = ' https://www.mit.edu/~amini/LICENSE.md'
38- }
39- }
40-
41- developers {
42- developer {
43- id = ' engineering'
44- name = ' Engineering'
45- }
46- }
47-
48- scm {
49- connection
= ' scm:git:[email protected] :launchableinc/openai-java.git' 50- developerConnection
= ' scm:git:[email protected] :launchableinc/openai-java.git' 51- url = ' https://github.com/launchableinc/openai-java'
52- }
53- }
54- }
55- }
5+ allprojects {
6+ plugins. withId(" com.vanniktech.maven.publish" ) {
7+ mavenPublishing {
8+ // Publish to Maven Central via Central Portal (no authentication required for users!)
9+ publishToMavenCentral()
10+ signAllPublications()
5611 }
5712 }
5813}
Original file line number Diff line number Diff line change 11apply plugin : ' java-library'
2+ apply plugin : " com.vanniktech.maven.publish"
23
34dependencies {
45 api project(" :api" )
Original file line number Diff line number Diff line change 11apply plugin : ' java-library'
2+ apply plugin : " com.vanniktech.maven.publish"
23
34dependencies {
45 api project(" :client" )
You can’t perform that action at this time.
0 commit comments