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
2020-07-05 16:10:13 -07:00

64 lines
2.3 KiB
YAML

name: Rust
on:
push:
branches: [ master ]
jobs:
overlay:
runs-on: ubuntu-latest
container: devkitpro/devkita64:latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: make
run: make
working-directory: TrainingModpackOverlay
- name: Upload build artifact
uses: actions/upload-artifact@v1
with:
name: overlay
path: TrainingModpackOverlay/ovlTrainingModpack.ovl
upload:
runs-on: ubuntu-latest
needs: overlay
steps:
- uses: actions/checkout@v2
- name: Install cargo-skyline
run: cargo install --git https://github.com/jam1garner/cargo-skyline
- name: Install rust-std-skyline-squashed
run: cd .. && git clone https://github.com/jam1garner/rust-std-skyline-squashed && cd -
- name: Install xargo
run: cargo install xargo
- name: Attempt to build
run: XARGO_RUST_SRC=$(realpath ../rust-std-skyline-squashed/src) PATH=$PATH:/usr/share/rust/.rustup/toolchains/nightly-2020-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin cargo skyline build --release
- uses: actions/download-artifact@v1
with:
name: overlay
- name: Prepare zip
run: |
mkdir -p atmosphere/contents/01006A800016E000/romfs/skyline/plugins/
cp ./target/aarch64-skyline-switch/release/libtraining_modpack.nro atmosphere/contents/01006A800016E000/romfs/skyline/plugins/libtraining_modpack.nro
mkdir -p switch/.overlays/
cp overlay/ovlTrainingModpack.ovl switch/.overlays/ovlTrainingModpack.ovl
zip -r training_modpack_beta.zip atmosphere switch
- 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.
Use the files on the ZIP to replace your existing files from a full Release zip.
- `atmosphere/contents/01006A800016E000/romfs/skyline/plugins/libtraining_modpack.nro` is the mod for the game itself
- `switch/.overlays/ovlTrainingModpack.ovl` is the Tesla submenu
files: >
training_modpack_beta.zip