All checks were successful
Build & Release Pack / build (push) Successful in 1m44s
- create-client.toml: ingameMenuConfigButtonRow=0 (hide pause-menu config button) - supplementaries-client.toml: configs_button=false (hide Quark-style config button) - add World Portal 0.0.10 (server-side) to both packs — hard dep of The Void Dimension - docs/mods.md: correct outdated Sinytra/Steam'n'Rails refs, document physics stack + compat notes - CI: also build/validate/release the server_pack alongside the client pack
83 lines
No EOL
2.9 KiB
YAML
83 lines
No EOL
2.9 KiB
YAML
name: Build & Release Pack
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
|
|
- name: Install packwiz
|
|
run: go install github.com/packwiz/packwiz@latest
|
|
|
|
- name: Add packwiz to PATH
|
|
run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Refresh index
|
|
working-directory: client_pack
|
|
run: packwiz refresh
|
|
|
|
- name: Integrity check
|
|
working-directory: client_pack
|
|
run: python3 ../tools/validate_pack.py . integrity
|
|
|
|
- name: Sanity grep download URLs
|
|
working-directory: client_pack
|
|
run: python3 ../tools/validate_pack.py . sanity
|
|
|
|
- name: Export client Modrinth pack
|
|
working-directory: client_pack
|
|
run: packwiz modrinth export -o ../SCICRAFT-${GITHUB_REF_NAME}.mrpack --restrictDomains=false
|
|
|
|
- name: Refresh server index
|
|
working-directory: server_pack
|
|
run: packwiz refresh
|
|
|
|
- name: Integrity check (server)
|
|
working-directory: server_pack
|
|
run: python3 ../tools/validate_pack.py . integrity
|
|
|
|
- name: Sanity grep download URLs (server)
|
|
working-directory: server_pack
|
|
run: python3 ../tools/validate_pack.py . sanity
|
|
|
|
- name: Export server Modrinth pack
|
|
working-directory: server_pack
|
|
run: packwiz modrinth export -o ../SCICRAFT-SERVER-${GITHUB_REF_NAME}.mrpack --restrictDomains=false
|
|
|
|
- name: Upload pack artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: scicraft-pack
|
|
path: |
|
|
SCICRAFT-${GITHUB_REF_NAME}.mrpack
|
|
SCICRAFT-SERVER-${GITHUB_REF_NAME}.mrpack
|
|
|
|
- name: Release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
set -e
|
|
TAG="${GITHUB_REF_NAME}"
|
|
API="https://git.mithraic.cloud/api/v1/repos/ad3laid3/SciCraft/releases"
|
|
AUTH="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
|
|
RELEASE_JSON=$(curl -sS -X POST "$API" \
|
|
-H "$AUTH" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"SCICRAFT $TAG\",\"body\":\"Download the .mrpack and import it into Prism Launcher (File > Import Instance > select the file). All mods are bundled or auto-fetched. Use the SERVER pack on the server side.\"}")
|
|
RELEASE_ID=$(printf '%s' "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
for mr in "SCICRAFT-${TAG}.mrpack" "SCICRAFT-SERVER-${TAG}.mrpack"; do
|
|
curl -sS -X POST "$API/$RELEASE_ID/assets?name=${mr}" \
|
|
-H "$AUTH" \
|
|
-F "attachment=@${mr}"
|
|
done
|
|
echo "Uploaded SCICRAFT-${TAG}.mrpack and SCICRAFT-SERVER-${TAG}.mrpack" |