File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66name : build
77on :
8- push :
9- tags-ignore :
10- - ' **'
11- branches :
12- - ' **'
13- paths-ignore :
14- - ' .github/**'
15- - ' !.github/workflows/**'
16- - ' **.md'
17- - ' python_scripts/**'
18- workflow_dispatch :
8+ push :
9+ tags-ignore :
10+ - ' **'
11+ branches :
12+ - ' **'
13+ paths-ignore :
14+ - ' .github/**'
15+ - ' !.github/workflows/**'
16+ - ' **.md'
17+ workflow_dispatch :
1918
2019jobs :
21- build :
22- runs-on : ubuntu-latest
23- steps :
24- - name : checkout repository
25- uses : actions/checkout@v3
26- with :
27- fetch-depth : 1
28- - name : validate gradle wrapper
29- uses : gradle/wrapper-validation-action@v1
30- - name : cache gradle
31- uses : actions/cache@v3
32- with :
33- path : |
34- ~/.gradle/caches
35- ~/.gradle/wrapper
36- key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
37- restore-keys : |
38- ${{ runner.os }}-gradle-
39- - name : setup jdk 17
40- uses : actions/setup-java@v3
41- with :
42- distribution : temurin
43- java-version : 17
44- - name : build
45- run : ./gradlew build --no-daemon
46- - name : capture build artifacts
47- uses : actions/upload-artifact@v3
48- with :
49- name : Artifacts
50- path : build/libs/
20+ build :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : checkout repository
24+ uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 1
27+
28+ - name : validate gradle wrapper
29+ uses : gradle/actions/wrapper-validation@v4
30+
31+ - name : cache gradle
32+ uses : actions/cache@v4
33+ with :
34+ path : |
35+ ~/.gradle/caches
36+ ~/.gradle/wrapper
37+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
38+ restore-keys : |
39+ ${{ runner.os }}-gradle-
40+
41+ - name : setup jdk 21
42+ uses : actions/setup-java@v4
43+ with :
44+ distribution : temurin
45+ java-version : 21
46+
47+ - name : build
48+ run : ./gradlew build --no-daemon
49+
50+ - name : capture build artifacts
51+ uses : actions/upload-artifact@v4
52+ with :
53+ name : Artifacts
54+ path : build/libs/
Original file line number Diff line number Diff line change 11name : Publish release
22
33on :
4- release :
5- types :
6- - published
4+ release :
5+ types :
6+ - published
77
88jobs :
9- build :
10- runs-on : ubuntu-latest
11- steps :
12- - uses : actions/checkout@v3
13- with :
14- fetch-depth : 1
15- - uses : actions/setup-java@v3
16- with :
17- distribution : temurin
18- java-version : 17
19- - name : Build and publish with Gradle
20- run : ./gradlew modrinth publish
21- env :
22- BUILD_RELEASE : ${{github.event.prelease == false}}
23- MODRINTH_TOKEN : ${{secrets.MODRINTH}}
24- CHANGELOG : ${{ github.event.release.body }}
25- - name : Upload build artifacts
26- uses : AButler/upload-release-assets@v2.0
27- with :
28- files : ' build/libs/*; build/libs/*-sources.jar; !build/libs/*-dev.jar '
29- repo -token : ${{secrets.GITHUB_TOKEN}}
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 1
15+
16+ - uses : actions/setup-java@v4
17+ with :
18+ distribution : temurin
19+ java-version : 21
20+
21+ - name : Build and publish with Gradle
22+ run : ./gradlew assemble
23+
24+ - uses : Kira-NT/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659
25+ with :
26+ modrinth-id : dBOB3VZD
27+ modrinth-token : ${{ secrets.MODRINTH }}
28+
29+ github -token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments