File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Publish
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - uses : actions/setup-java@v4
14+ with :
15+ distribution : temurin
16+ java-version : |
17+ 8
18+ 16
19+ 17
20+ 21
21+
22+ - uses : actions/cache@v4
23+ with :
24+ path : ~/.gradle/wrapper
25+ key : gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
26+
27+ - uses : actions/cache@v4
28+ with :
29+ path : |
30+ ~/.gradle/caches
31+ **/loom-cache
32+ key : gradle-caches-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle.properties', 'gradle/*.versions.toml') }}
33+ restore-keys : |
34+ gradle-caches-${{ hashFiles('**/*.gradle*') }}
35+ gradle-caches-
36+
37+ - name : Build
38+ run : ./gradlew build --stacktrace
39+
40+ - name : Publish
41+ if : startsWith(github.ref, 'refs/tags/v') # eg, v1.0.0
42+ run : ./gradlew publish --stacktrace
43+ env :
44+ ORG_GRADLE_PROJECT_nexus_user : ${{ secrets.NEXUS_USER }}
45+ ORG_GRADLE_PROJECT_nexus_password : ${{ secrets.NEXUS_PASSWORD }}
You can’t perform that action at this time.
0 commit comments