File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Publish package to the Maven Central Repository
2+ on :
3+ release :
4+ types : [created]
5+ jobs :
6+ publish :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v3
10+ - name : Set up Java
11+ uses : actions/setup-java@v3
12+ with :
13+ java-version : ' 8'
14+ distribution : ' zulu'
15+ cache : ' gradle'
16+ - name : Publish package
17+ env :
18+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
19+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
20+ run : ./gradlew publish
Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ publishing {
166166 repositories {
167167 maven {
168168 credentials {
169- username " $o ssrhUsername "
170- password " $o ssrhPassword "
169+ username = System . getenv( " MAVEN_USERNAME " )
170+ password = System . getenv( " MAVEN_PASSWORD " )
171171 }
172172 def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
173173 def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/'"
You can’t perform that action at this time.
0 commit comments