File tree 2 files changed +23
-10
lines changed
2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- " main"
7
+ pull_request :
7
8
tags :
8
9
- " v[0-9]+.[0-9]+.[0-9]+"
9
10
workflow_dispatch :
65
66
chatgpt-cli.${{ matrix.os }}.exe
66
67
67
68
push-docker :
69
+ if : startsWith(github.ref, 'refs/tags/')
68
70
name : Publish Docker Image
69
71
runs-on : ubuntu-latest
70
72
permissions :
@@ -98,3 +100,22 @@ jobs:
98
100
bootBuildImage \
99
101
--publishImage \
100
102
--parallel
103
+
104
+ publish-maven-packages :
105
+ if : startsWith(github.ref, 'refs/tags/')
106
+ name : Publish Maven Packages
107
+ runs-on : ubuntu-latest
108
+ steps :
109
+ - uses : actions/checkout@v3
110
+ - uses : graalvm/setup-graalvm@v1
111
+ with :
112
+ version : ' 22.3.1'
113
+ java-version : ' 17'
114
+ cache : ' gradle'
115
+ components : ' native-image'
116
+ github-token : ${{ secrets.GITHUB_TOKEN }}
117
+ - name : Publish Maven Packages
118
+ env :
119
+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
120
+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
121
+ run : ./gradlew --no-daemon publish
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ plugins {
4
4
}
5
5
6
6
group ' io.github.kezhenxu94'
7
- version ' 0.1.0-SNAPSHOT '
7
+ version ' 0.1.0'
8
8
sourceCompatibility = ' 11'
9
9
10
10
repositories {
@@ -29,17 +29,9 @@ publishing {
29
29
}
30
30
}
31
31
repositories {
32
- maven {
33
- name = " GitHubPackages"
34
- url = " https://maven.pkg.github.com/kezhenxu94/chatgpt-java"
35
- credentials {
36
- username = System . getenv(" GITHUB_ACTOR" )
37
- password = System . getenv(" GITHUB_TOKEN" )
38
- }
39
- }
40
32
maven {
41
33
name = " OSSRH"
42
- url = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
34
+ url = " https://s01. oss.sonatype.org/service/local/staging/deploy/maven2"
43
35
credentials {
44
36
username = System . getenv(" MAVEN_USERNAME" )
45
37
password = System . getenv(" MAVEN_PASSWORD" )
You can’t perform that action at this time.
0 commit comments