name: Build raylib examples - Windows

on:
  workflow_dispatch:
  push:
    paths:
      - 'src/**'
      - 'examples/**'
      - '.github/workflows/windows_examples.yml'
  pull_request:
    branches: [ master ]
    paths:
      - 'src/**'
      - 'examples/**'
      - '.github/workflows/windows_examples.yml'

permissions:
  contents: read

jobs:
  build:
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v4

    - name: Add MSBuild to PATH
      uses: microsoft/setup-msbuild@v1

    - name: Build Library (MSVC16)
      run: |
        cd projects/VS2019
        msbuild.exe raylib.sln /property:Configuration=Release /property:Platform=x86
        cd ../..
      shell: cmd

