Skip to content

Commit 31417bb

Browse files
committed
- 更新自动构建配置.
1 parent 6a49d81 commit 31417bb

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
name: Build mod
22

3-
on: [ push, pull_request, workflow_dispatch ]
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
411

512
jobs:
613
build:
7-
name: Build mod
814
runs-on: ubuntu-latest
9-
1015
steps:
11-
- uses: actions/checkout@v3
12-
- name: Set up JDK 1.8
13-
uses: actions/setup-java@v3
14-
with:
15-
distribution: 'adopt'
16-
java-version: '8'
17-
- name: Grant execute permission for gradlew
18-
run: chmod +x gradlew
19-
- name: Build with Gradle
20-
run: ./gradlew -Pnet.minecraftforge.gradle.disableUpdateChecker=true build
21-
- name: Upload artifacts
22-
uses: actions/upload-artifact@v4
23-
with:
24-
name: StellarCore
25-
path: build/libs
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: 21
24+
cache: gradle
25+
26+
- name: Build with Gradle
27+
run: ./gradlew build -x test --no-daemon
28+
29+
- name: Upload artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: StellarCore
33+
path: build/libs/*.jar
34+
if-no-files-found: error

0 commit comments

Comments
 (0)