diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..78eeff2 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,47 @@ +# .NET Desktop + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: 'SharpRDP/SharpRDP.sln' + arch: 'x64' + conf: 'Release' + s3path: '/SharpRDP45.exe' + outpath: 'SharpRDP/SharpRDP/bin/Release/SharpRDP.exe' + s3helperurl: 'https://github.com/3lpsy/s3upload/releases/download/0.0.1/s3upload-windows-amd64' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: MSBuild@1 + inputs: + solution: '$(solution)' + configuration: 'Release' + msbuildArchitecture: '$(arch)' + clean: true + +- task: PowerShell@2 + inputs: + targetType: 'inline' + script: '(New-Object Net.WebClient).DownloadFile("$(s3helperurl)", "$(Build.SourcesDirectory)/s3upload.exe")' + failOnStderr: true + workingDirectory: '$(Build.SourcesDirectory)' + +- task: PowerShell@2 + inputs: + targetType: 'inline' + script: '$(Build.SourcesDirectory)/s3upload.exe -source $(Build.SourcesDirectory)/$(outpath) -destination $(s3path)' + failOnStderr: true + env: + AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) + AWS_BUCKET: $(AWS_BUCKET) +