File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish package to the Maven Central Repository and GitHub Packages
2
+ on :
3
+ release :
4
+ types : [created]
5
+ jobs :
6
+ publish :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
10
+ - uses : actions/checkout@v2
11
+ - name : Set up JDK 1.8
12
+ uses : actions/setup-java@v1
13
+ with :
14
+ java-version : 1.8
15
+ - name : Cache Gradle packages
16
+ uses : actions/cache@v2
17
+ with :
18
+ path : ~/.gradle/caches
19
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
20
+ restore-keys : ${{ runner.os }}-gradle
21
+ - name : build
22
+ run : |
23
+ case "$GITHUB_REF" in
24
+ *-rc\.*)
25
+ echo "Publishing Release Candidate $GITHUB_REF"
26
+ ./gradlew --info --stacktrace -Psonatype.username=${{ secrets.ORG_SONATYPE_USERNAME }} -Psonatype.password=${{ secrets.ORG_SONATYPE_PASSWORD }} -Pbintray.user=${{ secrets.ORG_BINTRAY_USER }} -Pbintray.apiKey=${{ secrets.ORG_BINTRAY_KEY }} -Prelease.travisci=true -Prelease.useLastTag=true candidate
27
+ ;;
28
+ *)
29
+ echo "Publishing Final Release $GITHUB_REF"
30
+ ./gradlew --info --stacktrace -Psonatype.username=${{ secrets.ORG_SONATYPE_USERNAME }} -Psonatype.password=${{ secrets.ORG_SONATYPE_PASSWORD }} -Pbintray.user=${{ secrets.ORG_BINTRAY_USER }} -Pbintray.apiKey=${{ secrets.ORG_BINTRAY_KEY }} -Prelease.travisci=true -Prelease.useLastTag=true final
31
+ ;;
32
+ esac
You can’t perform that action at this time.
0 commit comments