Skip to content

Updated build.yml

Updated build.yml #139

Workflow file for this run

name: Build
on:
push:
branches:
- main
- "feature/*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Dart SDK
uses: dart-lang/[email protected]
- name: Fetch Dependencies
run: dart pub get .
- name: Make Build Directories
run: "mkdir -p build/releases/${{ matrix.platform }} &&
mkdir ./scripts/installers/${{ matrix.platform }}/lib"
- name: Build Executable
run: dart compile exe ./lib/main.dart --target-os ${{ matrix.platform }} -o build/releases/${{ matrix.platform }}/${{ matrix.output}}
- name: Build Squirrel
uses: threeal/[email protected]
with:
source-dir: ./src/squirrel3/
build-dir: ./src/squirrel3/
- name: Adding files to Artifact
run: ${{ matrix.add-command}}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: build/releases/${{ matrix.platform }}/
retention-days: 14
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
output: arceus.elf
add-command: "cp --force ./src/squirrel3/squirrel/libsquirrel.so ./scripts/installers/linux/lib/squirrel.so && cp -r ./scripts/installers/linux/ ./build/releases/"
- os: windows-latest
platform: windows
output: arceus.exe
add-command: "cp ./src/squirrel3/squirrel/Debug/squirrel.dll ./scripts/installers/windows/lib/squirrel.dll && xcopy ./scripts/installers/windows ./build/releases/windows"
- os: macos-latest
platform: macos
output: arceus.app
path-to-squirrel-library: ./src/squirrel3/squirrel/libsquirrel.so
rename-squirrel-to: squirrel.dylib