trigger:
  branches:
    include:
    - '*'
  paths:
    exclude:
    - .appveyor.yml

pr:
  branches:
    include:
    - '*'
  paths:
    exclude:
    - .appveyor.yml

jobs:
- job:
  pool:
    vmImage: windows-latest
  strategy:
    matrix:
      Release:
        configuration: Release
      Debug:
        configuration: Debug

  steps:
  - script: |
      git submodule update --init --recursive
      premake5.bat
    displayName: 'Before build'

  - task: VSBuild@1
    inputs:
      solution: 'build\*.sln' 
      vsVersion: 'latest'

  - script: |
      copy bin\GTAIV.EFLC.FusionFix.asi data\plugins\GTAIV.EFLC.FusionFix.asi
      7z a GTAIV.EFLC.FusionFix.Min.zip data\*
    condition: and(succeeded(), eq(variables['Agent.JobName'], 'Release'))
    displayName: 'After build'

  - publish: GTAIV.EFLC.FusionFix.Min.zip
    artifact: GTAIV.EFLC.FusionFix.Min.zip
    condition: and(succeeded(), eq(variables['Agent.JobName'], 'Release'))
    displayName: Publish artifact(s)
