File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a Java project with Gradle
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+ name : Build
5+
6+ on : [push, pull_request]
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - name : Set up JDK 8
14+ uses : actions/setup-java@v2
15+ with :
16+ java-version : ' 8'
17+ distribution : ' adopt'
18+ - name : Grant execute permission for gradlew
19+ run : chmod +x gradlew
20+ - name : Build with Gradle
21+ run : ./gradlew build
22+ - name : Publish Test Report
23+ uses : mikepenz/action-junit-report@v2
24+ if : always() # always run even if the previous step fails
25+ with :
26+ report_paths : ' **/build/test-results/test/TEST-*.xml'
Original file line number Diff line number Diff line change 1+ # This workflow will build a Java project with Gradle
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+ name : Publish
5+
6+ on :
7+ workflow_dispatch :
8+ branches : [ master ]
9+
10+ jobs :
11+ publish :
12+ runs-on : ubuntu-latest
13+ environment : prod
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Set up JDK 8
17+ uses : actions/setup-java@v2
18+ with :
19+ java-version : ' 8'
20+ distribution : ' adopt'
21+ - name : Grant execute permission for gradlew
22+ run : chmod +x gradlew
23+ - name : Build with Gradle
24+ run : ./gradlew build
25+ - name : Publish with Gradle
26+ run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
27+ env :
28+ MAVEN_CENTRAL_USER : ${{ secrets.MAVEN_CENTRAL_USER }}
29+ MAVEN_CENTRAL_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
30+ MAVEN_CENTRAL_PGP_KEY : ${{ secrets.MAVEN_CENTRAL_PGP_KEY }}
You can’t perform that action at this time.
0 commit comments