From f79547e793e650c21c60e444a0948eb1733f5a47 Mon Sep 17 00:00:00 2001 From: caelunshun Date: Sat, 31 Aug 2019 17:08:28 -0600 Subject: [PATCH] Fix GitHub Releases on Windows --- .azure-pipelines.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 3f8a2bc2a..e2eabc28c 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -143,6 +143,15 @@ jobs: sourceFolder: '$(Build.SourcesDirectory)/target/release' contents: feather_server targetFolder: '$(Build.BinariesDirectory)/feather' + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + + - task: CopyFiles@2 + displayName: Copy assets + inputs: + sourceFolder: '$(Build.SourcesDirectory)\target\release' + contents: feather_server.exe + targetFolder: '$(Build.BinariesDirectory)\feather' + condition: eq( variables['Agent.OS'], 'Windows_NT' ) - task: ArchiveFiles@2 displayName: Gather assets @@ -151,9 +160,17 @@ jobs: archiveType: 'tar' tarCompression: 'gz' archiveFile: '$(Build.ArtifactStagingDirectory)/feather-$(build.tag)-$(platform).tar.gz' + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + + - task: ArchiveFiles@2 + displayName: Gather assets + inputs: + rootFolderOrFile: '$(Build.BinariesDirectory)\feather\*' + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)\feather-$(build.tag)-$(platform).zip' + condition: eq( variables['Agent.OS'], 'Windows_NT' ) - task: GithubRelease@0 - condition: succeeded() inputs: gitHubConnection: 'caelunshun_pat' repositoryName: 'caelunshun/feather' @@ -165,3 +182,18 @@ jobs: title: '$(build.tag)' assetUploadMode: 'replace' addChangeLog: false + condition: and(succeeded(), ne( variables['Agent.OS'], 'Windows_NT' )) + + - task: GithubRelease@0 + inputs: + gitHubConnection: 'caelunshun_pat' + repositoryName: 'caelunshun/feather' + action: 'edit' + target: '$(build.sourceVersion)' + tagSource: 'manual' + tag: '$(build.tag)' + assets: '$(Build.ArtifactStagingDirectory)\feather-$(build.tag)-$(platform).zip' + title: '$(build.tag)' + assetUploadMode: 'replace' + addChangeLog: false + condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ))