File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed
Expand file tree Collapse file tree 2 files changed +67
-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 : Java CI with Gradle
5+
6+ on :
7+ push :
8+ branches : [ master ]
9+ pull_request :
10+ branches : [ master ]
11+
12+ jobs :
13+ build :
14+
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v3
19+ - name : Set up JDK 11
20+ uses : actions/setup-java@v3
21+ with :
22+ distribution : ' temurin'
23+ java-version : 11
24+ - name : Grant execute permission for gradlew
25+ run : chmod +x gradlew
26+ - name : Build with Gradle
27+ run : ./gradlew clean build
28+ - name : Upload coverage to Codecov
29+ uses : codecov/codecov-action@v3
Original file line number Diff line number Diff line change 1+ # This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
2+ # For more information see: https://github.com/actions/setup-java#publishing-using-gradle
3+
4+ name : Gradle Package
5+
6+ on :
7+ release :
8+ types : [created]
9+
10+ jobs :
11+ build :
12+
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v3
17+ - name : Set up JDK 11
18+ uses : actions/setup-java@v3
19+ with :
20+ distribution : ' temurin'
21+ java-version : 11
22+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
23+ settings-path : ${{ github.workspace }} # location for the settings.xml file
24+ - name : Grant execute permission for gradlew
25+ run : chmod +x gradlew
26+ - name : Build with Gradle
27+ run : ./gradlew clean build
28+
29+ # The USERNAME and PASSWORD need to correspond to the credentials environment variables used in
30+ # the publishing section of your build.gradle
31+ - name : Publish to GitHub Packages
32+ run : ./gradlew --rerun-tasks publish
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+ - name : Publish to GitHub Packages publishAllPublicationsToGitHubPackagesRepository
36+ run : ./gradlew --rerun-tasks publishAllPublicationsToGitHubPackagesRepository
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments