From 61d6e7558d7fa5b32836e1c88cdcf9b547eebc08 Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Mon, 29 Apr 2019 22:52:19 +0200 Subject: [PATCH] Using Azure DevOps pipeline build for publishing a single-exe Greenshot --- azure-pipelines.yml | 27 ++++++++++++----- src/Directory.Build.props | 2 +- src/Greenshot/Forms/AboutForm.cs | 8 ++++- src/Greenshot/Helpers/EnvironmentInfo.cs | 37 +++++++++++++++--------- 4 files changed, 51 insertions(+), 23 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8ada15d18..4db6aa0c7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,20 +29,31 @@ steps: restoreSolution: '$(solution)' feedsToUse: config -- task: VSBuild@1 - displayName: 'Build solution **\*.sln' +- task: DotNetCoreCLI@2 + displayName: Publish single-exe x64 inputs: - vsVersion: 'latest' - solution: '$(solution)' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' + command: 'publish' + publishWebProjects: false + projects: 'src\Greenshot\Greenshot.csproj' + arguments: '-f netcoreapp3.0 -c Release /p:PublishSingleFile=true /p:UseAppHost=true /p:RuntimeIdentifier=win-x64' + zipAfterPublish: false + +- task: DotNetCoreCLI@2 + displayName: Publish single-exe x86 + inputs: + command: 'publish' + publishWebProjects: false + projects: 'src\Greenshot\Greenshot.csproj' + arguments: '-f netcoreapp3.0 -c Release /p:PublishSingleFile=true /p:UseAppHost=true /p:RuntimeIdentifier=win-x86' + zipAfterPublish: false - task: CopyFiles@2 displayName: 'Copy Files to: $(build.artifactstagingdirectory)' inputs: - SourceFolder: '$(Build.SourcesDirectory)\src\Greenshot\bin\$(BuildConfiguration)' + SourceFolder: '$(Build.SourcesDirectory)\src\Greenshot\bin\Release\netcoreapp3.0' Contents: | - ** + win-x64\publish\Greenshot.exe + win-x86\publish\Greenshot.exe TargetFolder: '$(build.artifactstagingdirectory)' flattenFolders: false diff --git a/src/Directory.Build.props b/src/Directory.Build.props index de13677e1..03fb7ef19 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -57,7 +57,7 @@ - +