name: Build Windows

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  build-windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4

      - uses: subosito/flutter-action@v2
        with:
          channel: stable

      - run: flutter pub get

      - run: flutter build windows --release

      - uses: actions/upload-artifact@v4
        with:
          name: imajViewer-windows
          path: build/windows/x64/runner/Release/
