---
labels:
  platform: windows/amd64

matrix:
  BUILD_TYPE:
    - Release

when:
  - event: push
    branch: master
    repo: gnif/LookingGlass

clone:
  - name: clone
    image: woodpeckerci/plugin-git
    pull: false
    settings:
      tags: true

steps:
  - name: idd
    image: lg-vs2022:latest
    pull: true
    environment:
      VS_PATH: "\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2022\\\\\""
    entrypoint:
      - cmd
      - /C
      - >
        %VS_PATH%\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 &&
        msbuild /restore idd\LGIdd.sln /p:Configuration=${BUILD_TYPE} /p:RestorePackagesConfig=true /p:Platform=x64 /p:SignMode=Off /m &&
        IF EXIST C:\artifacts\build.cmd (cmd /C C:\artifacts\build.cmd)
