forked from teaconmc/Puer
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.98 KB
/
2022-modpack-build.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
name: TeaCon 2022 build modpack for build server
on:
workflow_run:
workflows: [ 'TeaCon 2022 deploy to build server' ]
types:
- completed
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout the Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Apply Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-build-teacon-mods
path: |
/tmp/build-teacon-mods
restore-keys: |
${{ runner.os }}-build-teacon-mods
- name: Download Related Mods
run: |
mkdir -p 2022/mods
# kotlin for forge
echo Downloading kotlinforforge-3.6.0-obf.jar ...
wget -q -O 2022/mods/kotlinforforge-3.6.0-obf.jar \
https://mediafiles.forgecdn.net/files/3829/616/kotlinforforge-3.6.0-obf.jar
# scalable cat's force
echo Downloading ScalableCatsForce-2.13.8-build-4-with-library.jar ...
wget -q -O 2022/mods/ScalableCatsForce-2.13.8-build-4-with-library.jar \
https://media.forgecdn.net/files/3759/354/ScalableCatsForce-2.13.8-build-4-with-library.jar
# remote sync
echo Downloading RemoteSync-FML-0.2.3-all.jar ...
wget -q -O 2022/mods/RemoteSync-FML-0.2.3-all.jar \
https://archive.teacon.cn/maven/org/teacon/RemoteSync-FML/0.2.3/RemoteSync-FML-0.2.3-all.jar
# resource sync
echo Downloading ResourceSync-Forge-1.18-0.2.1.jar ...
wget -q -O 2022/mods/ResourceSync-Forge-1.18-0.2.1.jar \
https://archive.teacon.cn/maven/org/teacon/ResourceSync-Forge-1.18/0.2.1/ResourceSync-Forge-1.18-0.2.1.jar
- name: Build Modpack for Build Server
env:
HEAD: ${{ github.sha }}
run: |
version=`git describe --tags --abbrev=0 "$HEAD" | cut -c 2-`
bash .github/build_modpack.sh -f 40.1.59 -m 1.18.2 -p "TeaCon 2022" \
-v "$version" -d 2022/servers-build.dat -r 2022/remote-sync-build.json 2022/
- name: Build Shaded Modpack
env:
HEAD: ${{ github.sha }}
run: |
version=`git describe --tags --abbrev=0 "$HEAD" | cut -c 2-`
bash .github/build_modpack.sh -s -c /tmp/build-teacon-mods -f 40.1.59 -m 1.18.2 -p "TeaCon 2022" \
-v "$version-Shaded" -d 2022/servers-build.dat -r 2022/remote-sync-build.json 2022/
- name: Upload to TeaCon Archive
env:
S3_ENDPOINT: ${{ secrets.TEACON_ARCHIVE_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.TEACON_ARCHIVE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEACON_ARCHIVE_SECRET_KEY }}
# https://github.com/aws/aws-cli/issues/5623
AWS_EC2_METADATA_DISABLED: 'true'
run: |
for zip in `ls TeaCon2022-*.zip | tac`; do
echo Uploading "$zip" to "s3://2022/modpack/$zip" ...
aws s3 cp --endpoint-url $S3_ENDPOINT `realpath $zip` "s3://2022/modpack/$zip"
done