File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " gradle"
4+ directory : " /"
5+ schedule :
6+ interval : " weekly"
Original file line number Diff line number Diff line change 1+ name : CI
2+ on : [ push ]
3+ jobs :
4+ build :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v3
8+ - name : Set up JDK 11
9+ uses : actions/setup-java@v3
10+ with :
11+ distribution : ' temurin'
12+ java-version : ' 11'
13+ cache : ' gradle'
14+ - name : Build with Gradle
15+ run : ./gradlew build
Original file line number Diff line number Diff line change 1+ name : Publish
2+ on :
3+ release :
4+ types : [ published ]
5+ jobs :
6+ publish-release :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v3
10+ - name : Set up JDK 11
11+ uses : actions/setup-java@v3
12+ with :
13+ distribution : ' temurin'
14+ java-version : ' 11'
15+ cache : ' gradle'
16+ - name : Publish artifact
17+ env :
18+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19+ # The GITHUB_REF tag comes in the format 'refs/tags/xxx'.
20+ # So if we split on '/' and take the 3rd value, we can get the release name.
21+ run : |
22+ NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
23+ ./gradlew -Pversion=${NEW_VERSION} publish
You can’t perform that action at this time.
0 commit comments