Skip to content

Update dart.yml to v4 #42

Update dart.yml to v4

Update dart.yml to v4 #42

Workflow file for this run

name: Build on Push
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: ubuntu-latest
output-name: better_imports_linux
- os: macOS-latest
output-name: better_imports_macos
- os: windows-latest
output-name: better_imports.exe
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- name: Install dependencies
run: dart pub get
# Uncomment this step to verify the use of 'dart format' on each commit.
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: dart analyze
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: dart test
# Compile executables
- run: mkdir build
- run: dart compile exe bin/better_imports.dart -v -o build/${{ matrix.output-name }}
- uses: actions/upload-artifact@v4
with:
name: native-executables
path: build