name: Wails build Windows

on:
  workflow_dispatch:

env:
  # Necessary for most environments as build failure can occur due to OOM issues
  NODE_OPTIONS: "--max-old-space-size=4096"

jobs:
  build:
    strategy:
    # Failure in one platform build won't impact the others
      fail-fast: false
      matrix:
        build:
          - name: 'rum-goggles'
            platform:  'windows/amd64'
            os: 'windows-latest'

    runs-on: ${{ matrix.build.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          submodules: recursive

      - name: Build wails
        uses: tylertravisty/wails-build-action@v0.1.0
        id: build
        with:
          build-name: ${{ matrix.build.name }}
          build-platform: ${{ matrix.build.platform }}
          go-version: '1.20'
