-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (50 loc) · 1.35 KB
/
test_neoforge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: 测试NeoForge
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'neoforge/**'
- 'origin/**'
permissions:
contents: write
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Generate Matrix
id: set-matrix
run: |
chmod 777 matrix.sh && ./matrix.sh -path "neoforge"
test:
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Chose JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Read version.txt and save to variable
run: |
mod_version=$(cat version.txt)
echo "Version: $mod_version"
echo "MOD_VERSION=$mod_version" >> "$GITHUB_ENV"
- name: Init Files
run: |
chmod 777 init.sh && ./init.sh
- name: Build
run: |
cd ${{ matrix.config.mc-loader }}/${{ matrix.config.mc-loader }}-${{ matrix.config.mc-version }}
chmod 777 gradlew && ./gradlew clean build
cd ../..
- name: Show Files
run: |
ls ChatImage-jar/${{ env.MOD_VERSION }}