File tree Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Snapshot to Maven
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags-ignore :
8+ - ' *'
9+
10+ jobs :
11+ publish :
12+ runs-on : ubuntu-20.04
13+
14+ steps :
15+ - uses : actions/checkout@v2
16+ with :
17+ fetch-depth : 1
18+
19+ - name : Set up JDK 11
20+ uses : actions/setup-java@v2
21+ with :
22+ distribution : adopt
23+ java-version : 11
24+
25+ - name : Install dependencies
26+ run : bash ./install_deps.sh
27+
28+ - name : Compile Project
29+ run : |
30+ ./gradlew buildHeaders build
31+
32+ - name : Generate Source jar
33+ run : |
34+ ./gradlew androidSourcesJar
35+
36+ - name : Publish Snapshot to MavenCentral
37+ run : ./gradlew publishToSonatype --info
38+ env :
39+ OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
40+ OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
41+ SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }}
42+ SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
43+ SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
44+
Original file line number Diff line number Diff line change @@ -63,7 +63,11 @@ afterEvaluate {
6363 }
6464 repositories {
6565 maven {
66- url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
66+ if (VERSION . endsWith(' -SNAPSHOT' )) {
67+ url = uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" )
68+ } else {
69+ url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
70+ }
6771 credentials {
6872 username = ossrhUsername
6973 password = ossrhPassword
You can’t perform that action at this time.
0 commit comments