name: CI

on:
  push:
    branches: [ main ]

jobs:
  build_on_windows:
    runs-on: windows-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Install dependencies
      uses: msys2/setup-msys2@v2
      with:
        msystem: UCRT64
        update: true
        install: git mingw-w64-ucrt-x86_64-toolchain

    - name: Build
      run: mingw32-make win32
    
    - name: Upload artifact
      uses: actions/upload-artifact@v2
      with:
        name: ncmdump-artifacts
        path: ncmdump.exe