From b67fc8bc9a9985619e7ebc824f0b4588984077d9 Mon Sep 17 00:00:00 2001 From: singleNeuron Date: Mon, 25 May 2020 12:56:34 +0200 Subject: [PATCH 1/4] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..942ae8803 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,60 @@ +# .NET Desktop +# Build and run tests for .NET Desktop or Windows classic desktop solutions. +# Add steps that publish symbols, save build artifacts, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/t:restore' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: ArchiveFiles@2 + inputs: + rootFolderOrFile: 'dist/Release' + includeRootFolder: false + archiveType: 'zip' + archiveFile: 'AutumnBox.zip' + replaceExistingArchive: true + verbose: true + +- task: AppCenterDistribute@3 + inputs: + serverEndpoint: 'AppCenter' + appSlug: 'Autumn2077/AutumnBox' + appFile: 'AutumnBox.zip' + buildVersion: '$(Build.SourceVersion)' + releaseNotesOption: 'input' + releaseNotesInput: '$(Build.SourceVersionMessage)' + destinationType: 'groups' + distributionGroupId: '41f1b280-60af-43da-8a90-b06940e8babc' \ No newline at end of file From f6ffec953b86e2228f5085be7425b3dfb6a1eb49 Mon Sep 17 00:00:00 2001 From: singleNeuron Date: Tue, 26 May 2020 15:55:54 +0200 Subject: [PATCH 2/4] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 942ae8803..e4be8c0a7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,6 +49,7 @@ steps: verbose: true - task: AppCenterDistribute@3 + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: serverEndpoint: 'AppCenter' appSlug: 'Autumn2077/AutumnBox' @@ -57,4 +58,16 @@ steps: releaseNotesOption: 'input' releaseNotesInput: '$(Build.SourceVersionMessage)' destinationType: 'groups' - distributionGroupId: '41f1b280-60af-43da-8a90-b06940e8babc' \ No newline at end of file + distributionGroupId: '41f1b280-60af-43da-8a90-b06940e8babc' + +- task: AppCenterDistribute@3 + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev')) + inputs: + serverEndpoint: 'AppCenter' + appSlug: 'Autumn2077/AutumnBox' + appFile: 'AutumnBox.zip' + buildVersion: '$(Build.SourceVersion)' + releaseNotesOption: 'input' + releaseNotesInput: '$(Build.SourceVersionMessage)' + destinationType: 'groups' + distributionGroupId: '4f967e87-b760-4a38-87a5-495daccb7cb5' \ No newline at end of file From 4494073a00888fc7f9c994b58e97b558071a2397 Mon Sep 17 00:00:00 2001 From: singleNeuron Date: Tue, 26 May 2020 15:57:06 +0200 Subject: [PATCH 3/4] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e4be8c0a7..94fb36c68 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,6 +5,7 @@ trigger: - master +- dev pool: vmImage: 'windows-latest' From 5da3c3aa8e70093186924f368c144777b5d0e8b6 Mon Sep 17 00:00:00 2001 From: Seymour Zhang Date: Wed, 27 May 2020 00:49:36 +0800 Subject: [PATCH 4/4] Update .gitattributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 8b1378917..d6ecd1fd2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ - +azure-pipelines.yml merge=ours