trigger:
- master

pr:
- master

pool: UCSBUILD02

steps:
- script: 'call $(Build.SourcesDirectory)\scripts\build.bat'
  displayName: 'Build UcsFP20.dll'
  workingDirectory:  '$(Build.SourcesDirectory)\scripts'

- script: 'call $(Build.SourcesDirectory)\contrib\UcsFPHub\scripts\build.bat'
  displayName: 'Build UcsFPHub.exe'
  workingDirectory: '$(Build.SourcesDirectory)\contrib\UcsFPHub\scripts'

- task: CopyFiles@2
  displayName: Copy files to $(Build.BinariesDirectory)
  inputs:
    sourceFolder: '$(Build.SourcesDirectory)\bin'
    contents: |
      UcsFP20.dll
      UcsFPHub.exe
    targetFolder: '$(Build.BinariesDirectory)'

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.BinariesDirectory)'
    archiveFile: '$(Build.ArtifactStagingDirectory)/UcsFPHub-latest.zip' 

- task: PublishBuildArtifacts@1
  displayName: 'Publish UcsFPHub'
  inputs:
    pathToPublish: '$(Build.ArtifactStagingDirectory)'
    artifactName: UcsFPHub

- task: GithubRelease@0
  displayName: 'Edit GitHub Release'
  inputs:
    githubConnection: wqweto
    repositoryName: wqweto/UcsFiscalPrinters
    action: edit
    tag: UcsFPHub-latest
    title: 'UcsFPHub latest build'
    assets: $(Build.ArtifactStagingDirectory)/*
    addChangeLog: true
    isDraft: true
trigger:
- master

pr:
- master

pool: UCSBUILD02

steps:
- script: 'call $(Build.SourcesDirectory)\scripts\build.bat'
  displayName: 'Build UcsFP20.dll'
  workingDirectory:  '$(Build.SourcesDirectory)\scripts'

- script: 'call $(Build.SourcesDirectory)\contrib\UcsFPHub\scripts\build.bat'
  displayName: 'Build UcsFPHub.exe'
  workingDirectory: '$(Build.SourcesDirectory)\contrib\UcsFPHub\scripts'

- task: CopyFiles@2
  displayName: Copy files to $(Build.BinariesDirectory)
  inputs:
    sourceFolder: '$(Build.SourcesDirectory)\bin'
    contents: |
      UcsFP20.dll
      UcsFP20.pdb
      UcsFPHub.exe
      UcsFPHub.pdb
    targetFolder: '$(Build.BinariesDirectory)'

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.BinariesDirectory)'
    archiveFile: '$(Build.ArtifactStagingDirectory)/UcsFPHub-latest.zip' 

- task: PublishBuildArtifacts@1
  displayName: 'Publish UcsFPHub'
  inputs:
    pathToPublish: '$(Build.ArtifactStagingDirectory)'
    artifactName: UcsFPHub

- task: GithubRelease@0
  displayName: 'Edit GitHub Release'
  inputs:
    githubConnection: wqweto
    repositoryName: wqweto/UcsFiscalPrinters
    action: edit
    tag: UcsFPHub-latest
    title: 'UcsFPHub latest build'
    assets: $(Build.ArtifactStagingDirectory)/*
    addChangeLog: true
    isPreRelease: true

Include PDB files in Azure DevOps build artefacts/GitHub release assets
Include PDB files in Azure DevOps build artefacts/GitHub release assets
