2022-07-12 22:01:23 +00:00
|
|
|
name: Build artifacts
|
|
|
|
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description : 'version tag'
|
|
|
|
required : false
|
|
|
|
default : ''
|
2022-08-13 19:17:11 +00:00
|
|
|
prefix:
|
|
|
|
description : 'filename prefix'
|
|
|
|
required : false
|
|
|
|
default : ''
|
2022-09-04 23:41:34 +00:00
|
|
|
emu:
|
2023-06-05 20:56:27 +00:00
|
|
|
description : 'what system the build is for: Switch or Emulators'
|
2022-09-04 23:41:34 +00:00
|
|
|
required : false
|
|
|
|
default : 'Switch'
|
2022-07-12 22:01:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
filename:
|
|
|
|
description : 'Filename for the build artifacts'
|
|
|
|
value : ${{ steps.env.outputs.filename }}
|
|
|
|
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name : Environment
|
|
|
|
id : env
|
|
|
|
shell : bash
|
|
|
|
run: |
|
|
|
|
VERS=${{ inputs.tag }}
|
2022-10-20 22:06:52 +00:00
|
|
|
echo "version=${VERS:1}" >>$GITHUB_OUTPUT
|
|
|
|
echo "filename=${{ inputs.prefix }}SMO_Online${{ (inputs.tag != '' && format('_{0}', inputs.tag)) || '' }}_for_${{ inputs.emu }}" >>$GITHUB_OUTPUT
|
2022-07-12 22:01:23 +00:00
|
|
|
-
|
|
|
|
name : Set up Docker Buildx
|
2024-05-15 19:50:36 +00:00
|
|
|
uses : docker/setup-buildx-action@v3
|
2022-07-12 22:01:23 +00:00
|
|
|
-
|
|
|
|
name : Build environment
|
2024-05-15 19:50:36 +00:00
|
|
|
uses : docker/build-push-action@v5
|
2022-07-12 22:01:23 +00:00
|
|
|
with:
|
|
|
|
pull : true
|
|
|
|
push : false
|
|
|
|
load : true
|
|
|
|
context : .
|
|
|
|
file : ./Dockerfile
|
|
|
|
tags : smoo-build-env
|
|
|
|
platforms : linux/amd64
|
|
|
|
cache-from : type=gha,scope=smoo-build-env
|
|
|
|
cache-to : type=gha,scope=smoo-build-env,mode=max
|
|
|
|
-
|
2023-06-05 20:56:27 +00:00
|
|
|
name : Build mod
|
2022-07-12 22:01:23 +00:00
|
|
|
shell : bash
|
|
|
|
run: |
|
2022-09-04 23:41:34 +00:00
|
|
|
docker run --rm \
|
|
|
|
-u `id -u`:`id -g` \
|
|
|
|
-v "/$PWD/":/app/ \
|
2022-10-20 22:08:09 +00:00
|
|
|
-e ISEMU=${{ (inputs.emu != 'Switch' && '1') || '0' }} \
|
2024-05-15 20:15:49 +00:00
|
|
|
${{ (steps.env.outputs.version != '' && format('-e BUILDVERSTR={0}', steps.env.outputs.version)) || '' }} \
|
2022-07-12 22:01:23 +00:00
|
|
|
smoo-build-env \
|
|
|
|
;
|
|
|
|
cp -r ./romfs/ ./starlight_patch_100/atmosphere/contents/0100000000010000/.
|
2022-10-20 22:08:09 +00:00
|
|
|
-
|
2023-06-05 20:56:27 +00:00
|
|
|
name : Emulators
|
2022-10-20 22:08:09 +00:00
|
|
|
shell : bash
|
2023-06-05 20:56:27 +00:00
|
|
|
if : ${{ inputs.emu == 'Emulators' }}
|
2022-10-20 22:08:09 +00:00
|
|
|
run: |
|
|
|
|
cd ./starlight_patch_100/
|
|
|
|
mkdir ./SMOO/
|
|
|
|
mv ./atmosphere/contents/0100000000010000/exefs ./SMOO/exefs
|
|
|
|
mv ./atmosphere/contents/0100000000010000/romfs ./SMOO/romfs
|
2022-12-16 22:21:07 +00:00
|
|
|
mv ./atmosphere/exefs_patches/StarlightBase/3CA12DFAAF9C82DA064D1698DF79CDA1.ips ./SMOO/exefs/
|
2022-10-20 22:08:09 +00:00
|
|
|
rm -rf ./atmosphere/
|
2022-07-12 22:01:23 +00:00
|
|
|
-
|
|
|
|
name : Upload artifacts
|
2024-05-15 19:50:36 +00:00
|
|
|
uses : actions/upload-artifact@v4
|
2022-07-12 22:01:23 +00:00
|
|
|
with:
|
|
|
|
name : ${{ steps.env.outputs.filename }}
|
|
|
|
path : ./starlight_patch_100/
|
|
|
|
if-no-files-found : error
|