Skip to content

Instantly share code, notes, and snippets.

@shinayser
Last active February 28, 2020 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinayser/5a1a675fc0b40788e8de4cd1ec7299e3 to your computer and use it in GitHub Desktop.
Save shinayser/5a1a675fc0b40788e8de4cd1ec7299e3 to your computer and use it in GitHub Desktop.
#This Github Action builds the Dart 'bin' folder on every push commited to GitHub
name: Build on push
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
output-name: program-linux
- os: macOS-latest
output-name: program-mac
- os: windows-latest
output-name: program-windows.exe
steps:
- uses: actions/checkout@v2
- uses: DanTup/gh-actions/setup-dart@master
- name: Install dependencies
run: pub get
- name: Make build directory
run: mkdir build
- name: Make output object
run: dart2native bin/main.dart -v -o build/${{ matrix.output-name }}
- uses: actions/upload-artifact@v1
with:
name: native-executables
path: build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment