1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-20 00:46:34 +00:00
UltimateTrainingModpack/.github/workflows/rust.yml
2021-04-16 08:37:17 -07:00

84 lines
2.9 KiB
YAML

name: Rust
on:
push:
branches: [ master ]
jobs:
plugin:
runs-on: ubuntu-latest
container: jugeeya/cargo-skyline:latest
steps:
- uses: actions/checkout@v2
- name: Link rust-std-skyline src
run: mkdir ../rust-std-skyline-squashed && ln -s $XARGO_RUST_SRC ../rust-std-skyline-squashed/src
- name: Build release NRO
run: cargo skyline build --release
- name: Upload plugin artifact
uses: actions/upload-artifact@v2
with:
name: plugin
path: target/aarch64-skyline-switch/release/libtraining_modpack.nro
- name: Upload check SVG
uses: actions/upload-artifact@v2
with:
name: svg
path: src/templates/check.svg
- name: Build outside_training_mode NRO
run: cargo skyline build --features outside_training_mode
- name: Upload plugin (outside training mode) artifact
uses: actions/upload-artifact@v2
with:
name: plugin_outside_training_mode
path: target/aarch64-skyline-switch/dev/libtraining_modpack.nro
upload:
runs-on: ubuntu-latest
needs:
- plugin
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Prepare zip
env:
SKYLINE_DIR: atmosphere/contents/01006A800016E000
SMASH_PLUGIN_DIR: atmosphere/contents/01006A800016E000/romfs/skyline/plugins
SMASH_WEB_DIR: atmosphere/contents/01006A800016E000/manual_html/html-document/contents.htdocs
run: |
mkdir -p ${{env.SKYLINE_DIR}}
mkdir -p ${{env.SMASH_PLUGIN_DIR}}
mkdir -p ${{env.SMASH_WEB_DIR}}
wget https://github.com/skyline-dev/skyline/releases/download/beta/skyline.zip
unzip skyline.zip
mv exefs ${{env.SKYLINE_DIR}}
cp plugin/libtraining_modpack.nro ${{env.SMASH_PLUGIN_DIR}}/libtraining_modpack.nro
wget https://github.com/ultimate-research/params-hook-plugin/releases/download/v0.1.1/libparam_hook.nro
wget https://github.com/ultimate-research/nro-hook-plugin/releases/download/v0.1.1/libnro_hook.nro
cp libparam_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libparam_hook.nro
cp libnro_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libnro_hook.nro
cp svg/check.svg ${{env.SMASH_WEB_DIR}}/check.svg
zip -r training_modpack_beta.zip atmosphere
- name: Update Release
uses: meeDamian/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
allow_override: true
gzip: false
tag: beta
name: beta
body: >
Beta built off of the latest code in the repository.
Install the same way you would install a full release.
files: >
training_modpack_beta.zip
- name: Upload zip as artifact
uses: actions/upload-artifact@v1
with:
name: full_build
path: training_modpack_beta.zip