Skip to content

TeaCon 2022 build modpack for test server #2

TeaCon 2022 build modpack for test server

TeaCon 2022 build modpack for test server #2

name: TeaCon 2022 build modpack for test server
on:
workflow_run:
workflows: [ 'TeaCon 2022 deploy to test 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: Get Short Identifier
uses: benjlevesque/[email protected]
id: short-sha
- 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 Test Server
env:
COMMIT_SHA: ${{ steps.short-sha.outputs.sha }}
run: |
bash .github/build_modpack.sh -f 40.1.59 -m 1.18.2 -p "TeaCon 2022" \
-v 3.0.0-SNAPSHOT -d 2022/servers-test.dat -r 2022/remote-sync-test.json 2022/
cp TeaCon2022-3.0.0-SNAPSHOT.zip TeaCon2022-3.0.0-SNAPSHOT-$COMMIT_SHA.zip
- name: Build Shaded Modpack
env:
COMMIT_SHA: ${{ steps.short-sha.outputs.sha }}
run: |
bash .github/build_modpack.sh -s -c /tmp/build-teacon-mods -f 40.1.59 -m 1.18.2 -p "TeaCon 2022" \
-v 3.0.0-SNAPSHOT-Shaded -d 2022/servers-test.dat -r 2022/remote-sync-test.json 2022/
cp TeaCon2022-3.0.0-SNAPSHOT-Shaded.zip TeaCon2022-3.0.0-SNAPSHOT-$COMMIT_SHA-Shaded.zip
- 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