-
Notifications
You must be signed in to change notification settings - Fork 31
154 lines (127 loc) · 5.47 KB
/
1.19.4.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: 1.19.4 Build
on:
pull_request:
push:
branches:
- "1.19.4"
env:
MINECRAFT_VERSION: "1.19.4"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Gradle Wrapper Verification
uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Elevate wrapper permissions
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build Mods
run: ./gradlew build
- name: Get WorldMap Version Fabric
run: echo "WORLDMAP_VERSION_FABRIC=$(./gradlew -q printWorldMapVersionFabric)" >> $GITHUB_ENV
- name: Get Minimap Version Fabric
run: echo "MINIMAP_VERSION_FABRIC=$(./gradlew -q printMinimapVersionFabric)" >> $GITHUB_ENV
- name: Get WorldMap Version Forge
run: echo "WORLDMAP_VERSION_FORGE=$(./gradlew -q printWorldMapVersionForge)" >> $GITHUB_ENV
- name: Get Minimap Version Forge
run: echo "MINIMAP_VERSION_FORGE=$(./gradlew -q printMinimapVersionForge)" >> $GITHUB_ENV
- name: Get XaeroPlus Version
run: echo "XP_VERSION=$(./gradlew -q printXaeroPlusVersion)" >> $GITHUB_ENV
- name: Get Fabric Jar Filename
run: echo "XP_FABRIC=XaeroPlus-${{ env.XP_VERSION}}+fabric-${{ env.MINECRAFT_VERSION }}-WM${{ env.WORLDMAP_VERSION_FABRIC }}-MM${{ env.MINIMAP_VERSION_FABRIC }}" >> $GITHUB_ENV
- name: Get Forge Jar Filename
run: echo "XP_FORGE=XaeroPlus-${{ env.XP_VERSION}}+forge-${{ env.MINECRAFT_VERSION }}-WM${{ env.WORLDMAP_VERSION_FORGE }}-MM${{ env.MINIMAP_VERSION_FORGE }}" >> $GITHUB_ENV
- name: Upload Fabric Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.XP_FABRIC }}
path: fabric/build/libs/${{ env.XP_FABRIC }}.jar
if-no-files-found: error
- name: Upload Forge Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.XP_FORGE }}
path: forge/build/libs/${{ env.XP_FORGE }}.jar
if-no-files-found: error
outputs:
worldmap_version_fabric: ${{ env.WORLDMAP_VERSION_FABRIC }}
worldmap_version_forge: ${{ env.WORLDMAP_VERSION_FORGE }}
minimap_version_fabric: ${{ env.MINIMAP_VERSION_FABRIC }}
minimap_version_forge: ${{ env.MINIMAP_VERSION_FORGE }}
xp_fabric: ${{ env.XP_FABRIC }}
xp_forge: ${{ env.XP_FORGE }}
test-fabric:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Download job artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: artifacts/
- name: Set CI Test Env Var
run: echo "XP_CI_TEST=true" >> $GITHUB_ENV
- name: Setup Fabric Test Mods
run: |
mkdir -p run/mods && cp artifacts/${{ needs.build.outputs.xp_fabric }}.jar run/mods \
&& wget https://api.modrinth.com/maven/maven/modrinth/xaeros-minimap/${{ needs.build.outputs.minimap_version_fabric }}_Fabric_${{ env.MINECRAFT_VERSION }}/xaeros-minimap-${{ needs.build.outputs.minimap_version_fabric }}_Fabric_${{ env.MINECRAFT_VERSION }}.jar -P run/mods/ \
&& wget https://api.modrinth.com/maven/maven/modrinth/xaeros-world-map/${{ needs.build.outputs.worldmap_version_fabric }}_Fabric_${{ env.MINECRAFT_VERSION }}/xaeros-world-map-${{ needs.build.outputs.worldmap_version_fabric }}_Fabric_${{ env.MINECRAFT_VERSION }}.jar -P run/mods/
- name: Fabric Test
uses: headlesshq/[email protected]
with:
mc: ${{ env.MINECRAFT_VERSION }}
modloader: fabric
regex: .*fabric.*
mc-runtime-test: fabric
fabric-api: 0.87.2
java: 17
xvfb: false
headlessmc-command: -lwjgl --jvm -Djava.awt.headless=true
cache-mc: true
test-forge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Download job artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: artifacts/
- name: Set CI Test Env Var
run: echo "XP_CI_TEST=true" >> $GITHUB_ENV
- name: Setup Forge Test
run: |
mkdir -p run/mods && cp artifacts/${{ needs.build.outputs.xp_forge }}.jar run/mods \
&& wget https://api.modrinth.com/maven/maven/modrinth/xaeros-minimap/${{ needs.build.outputs.minimap_version_forge }}_Forge_${{ env.MINECRAFT_VERSION }}/xaeros-minimap-${{ needs.build.outputs.minimap_version_forge }}_Forge_${{ env.MINECRAFT_VERSION }}.jar -P run/mods/ \
&& wget https://api.modrinth.com/maven/maven/modrinth/xaeros-world-map/${{ needs.build.outputs.worldmap_version_forge }}_Forge_${{ env.MINECRAFT_VERSION }}/xaeros-world-map-${{ needs.build.outputs.worldmap_version_forge }}_Forge_${{ env.MINECRAFT_VERSION }}.jar -P run/mods/
- name: Forge Test
uses: headlesshq/[email protected]
with:
mc: ${{ env.MINECRAFT_VERSION }}
modloader: forge
regex: .*forge.*
mc-runtime-test: lexforge
java: 17
xvfb: false
headlessmc-command: -lwjgl --jvm -Djava.awt.headless=true
cache-mc: true