-
-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (141 loc) Β· 4.04 KB
/
release.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
# Copyright (c) 2022 Joshua Schmitt
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
name: "πΊ Release Build"
on:
push:
tags:
- 'v*'
jobs:
getinfo:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version.outputs.tag }}
name: "π Modpack Info"
steps:
- name: "π Checkout"
uses: actions/checkout@v4
- name: "π Get tag"
id: version
uses: "WyriHaximus/github-action-get-previous-tag@v1"
changelog:
runs-on: ubuntu-latest
name: "π Changelog"
outputs:
changelog: ${{steps.changelog.outputs.changelog}}
steps:
- name: "π Checkout"
uses: actions/checkout@v4
- name: "ποΈ Build Changelog"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.PROFILE_TOKEN }}
build_20:
name: πΈ Build 1.20
runs-on: ubuntu-latest
steps:
- name: π Checkout
uses: actions/checkout@v4
- name: π¦ ZIP
uses: vimtor/action-zip@v1
with:
files: assets/ pack.mcmeta pack.png credits.md
dest: pack.zip
- name: πΉ Upload
uses: actions/upload-artifact@v3
with:
name: JqshuvPack-1.20.X
path: |
assets/
pack.mcmeta
pack.png
credits.md
build_old:
name: π Build Old
runs-on: ubuntu-latest
strategy:
matrix:
version: [1.16, 1.17, 1.18, 19]
include:
- version: 1.16
pack_version: 6
- version: 1.17
pack_version: 7
- version: 1.18
pack_version: 8
- version: 1.19
pack_version: 13
steps:
- name: π Checkout
uses: actions/checkout@v4
with:
ref: 'ver/${{ matrix.version }}'
- name: πΎ Update config.json
run: echo "`jq '.pack.pack_format="${{ matrix.pack_version }}"' pack.mcmeta`" > pack.mcmeta
- name: π¦ ZIP
uses: vimtor/action-zip@v1
with:
files: assets/ pack.mcmeta pack.png credits.md
dest: pack.zip
- name: πΉ Upload
uses: actions/upload-artifact@v3
with:
name: JqshuvPack-${{ matrix.version }}.X
path: |
assets/
pack.mcmeta
pack.png
credits.md
zip_build:
name: "π Build ZIP Release"
needs: [build_old, build_19]
runs-on: ubuntu-latest
strategy:
matrix:
version: [1.16, 1.17, 1.18, 1.19, 1.20]
steps:
- name: "π½ Download Packs"
uses: actions/download-artifact@v3
with:
name: JqshuvPack-${{ matrix.version }}.X
- name: π¦ ZIP
run: zip -r JqshuvPack-${{ matrix.version }}.X.zip *
- name: πΉ Upload
uses: actions/upload-artifact@v3
with:
name: packs
path: JqshuvPack-${{ matrix.version }}.X.zip
release-github:
runs-on: ubuntu-latest
needs: [build_old, build_20, zip_build, changelog, getinfo]
name: "π Release to Github"
steps:
- name: "π½ Download Packs"
uses: actions/download-artifact@v3
with:
name: packs
- name: "π Get release type"
id: release-type
run: |
rel_type="release"
case "${{ needs.getinfo.outputs.tag }}" in
*alpha*) rel_type="true" ;;
*beta*) rel_type="true" ;;
*rc**) rel_type="true" ;;
*) rel_type="false" ;;
esac
echo "::set-output name=type::$rel_type"
- name: "𧬠Create release"
uses: softprops/action-gh-release@v1
with:
body_path: ${{ steps.changelog.outputs.changelog }}
prerelease: ${{ steps.release-type.outputs.type }}
files: |
JqshuvPack-1.16.X.zip
JqshuvPack-1.17.X.zip
JqshuvPack-1.18.X.zip
JqshuvPack-1.19.X.zip
JqshuvPack-1.20.X.zip
token: ${{ secrets.PROFILE_TOKEN }}