File tree Expand file tree Collapse file tree 2 files changed +21
-12
lines changed
Expand file tree Collapse file tree 2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -2,29 +2,38 @@ name: Publish
22
33on :
44 push :
5- tags :
6- - ' [0-9]+.[0-9]+.[0-9]+'
7-
5+ branches :
6+ - main
87jobs :
9- publish :
8+ tagpr :
9+ permissions :
10+ actions : write
11+ contents : write
12+ pull-requests : write
1013 runs-on : ubuntu-latest
11-
14+ outputs :
15+ tag : ${{ steps.run-tagpr.outputs.tag }}
1216 steps :
13- - uses : actions/checkout@v3
17+ - uses : actions/checkout@v4
18+ - uses : Songmu/tagpr@v1
19+ env :
20+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1421
22+ publish :
23+ needs : tagpr
24+ if : needs.tagpr.outputs.tag != '' || github.event_name == 'workflow_dispatch'
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v4
1528 - name : Set up JDK 1.8
1629 uses : actions/setup-java@v3
1730 with :
1831 distribution : temurin
1932 java-version : 8
20-
2133 - name : Test
2234 run : ./gradlew test
23- env :
24- OPENAI_TOKEN : ${{ secrets.OPENAI_TOKEN }}
25-
2635 - name : Publish
27- run : ./gradlew build publish --no-parallel
36+ run : ./gradlew publishAllPublicationsToMavenCentralRepository
2837 env :
2938 ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.SONATYPE_NEXUS_USERNAME }}
3039 ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ allprojects {
88 plugins. withId(" com.vanniktech.maven.publish" ) {
99 mavenPublishing {
1010 // Want to publish to so1.oss.sonatype.org
11- publishToMavenCentral(SonatypeHost . S01 ,true )
11+ publishToMavenCentral(SonatypeHost . S01 , true )
1212 signAllPublications()
1313 }
1414 }
You can’t perform that action at this time.
0 commit comments