-
Notifications
You must be signed in to change notification settings - Fork 10
129 lines (109 loc) · 4.54 KB
/
build-multiver.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
name: build (multiversion)
on:
release:
types: [created]
jobs:
build_1_19:
if: "!startsWith(github.event.head_commit.message, '[skip]')"
strategy:
matrix:
java: [ 17 ]
runs-on: ubuntu-latest
steps:
- name: steal code from repository
uses: actions/checkout@v3
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: cache gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/loom-cache
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle
- name: give gradle permission to murder github servers
run: chmod +x ./gradlew
- name: gradle murders github servers
run: ./gradlew assemble -PmcVer="1.19.2"
- name: Publish Fabric
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CF_API_TOKEN }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
run: ./gradlew :fabric:build :fabric:publish :fabric:publishMods
- name: Publish Forge
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CF_API_TOKEN }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
run: ./gradlew :forge:build :forge:publish :forge:publishMods
- name: upload merged build artifact to discord
if: success()
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: build/libs/merged/*.jar
- name: send build failure message to discord
if: failure()
uses: ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: 'Build failed for 1.19.2!'
build_1_20:
if: "!startsWith(github.event.head_commit.message, '[skip]')"
strategy:
matrix:
java: [ 17 ]
runs-on: ubuntu-latest
steps:
- name: steal code from repository
uses: actions/checkout@v3
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: cache gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/loom-cache
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle
- name: give gradle permission to murder github servers
run: chmod +x ./gradlew
- name: gradle murders github servers
run: ./gradlew assemble -PmcVer="1.20.1"
- name: Publish Fabric
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CF_API_TOKEN }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
run: ./gradlew :fabric:build :fabric:publish :fabric:publishMods
- name: Publish Forge
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CF_API_TOKEN }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
run: ./gradlew :forge:build :forge:publish :forge:publishMods
- name: upload merged build artifact to discord
if: success()
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: build/libs/merged/*.jar
- name: send build failure message to discord
if: failure()
uses: ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: 'Build failed for 1.20.1!'