File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # This workflow uses actions that are not certified by GitHub.
2- # They are provided by a third-party and are governed by
3- # separate terms of service, privacy policy, and support
4- # documentation.
5- # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7-
81name : Snapshot Build / 快照构建
92
10- on :
11- push :
12- branches : [ "main" ]
13- pull_request :
14- branches : [ "main" ]
3+ on : [push, pull_request]
154
165jobs :
17- snapshot-builder :
18-
6+ snapshot-build :
197 runs-on : ubuntu-latest
20- permissions :
21- contents : read
22-
238 steps :
24- - uses : actions/checkout@v4
25- - name : 安装 JDK 21
26- uses : actions/setup-java@v4
27- with :
28- java-version : ' 21'
29- distribution : ' temurin'
30-
31- # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
32- # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
33- - name : 设置 Gradle
34- uses : gradle/actions/setup-gradle@4 # v4.0.0
35- with :
36- gradle-version : " 8.11.2"
37-
38- - name : 构建
39- run : gradle build
40-
41- - name : 上传Artifacts
42- uses : actions/upload-artifacts@v4
43- with :
44- name : mafish-crafting-snapshot
45- path : build/libs/*.jar
9+ - name : 获取仓库文件
10+ uses : actions/checkout@v4
11+ with :
12+ fetch-depth : 0
13+ fetch-tags : true
14+
15+ - name : 安装 JDK 21
16+ uses : actions/setup-java@v4
17+ with :
18+ java-version : ' 21'
19+ distribution : ' temurin'
20+
21+ - name : 使用 Gradle 构建
22+ run : ./gradlew build
23+
24+ - name : 上传 Artifacts
25+ uses : actions/upload-artifact@v4
26+ with :
27+ name : mafish-crafting-snapshot
28+ path : build/libs/*.jar
You can’t perform that action at this time.
0 commit comments