forked from detunized/password-manager-access
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
107 lines (83 loc) · 2.04 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
trigger:
- master
- merge
- develop
- refs/tags/v*
jobs:
#
# Windows
#
- job: Windows
pool:
vmImage: 'windows-latest'
variables:
solution: 'password-manager-access.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
#
# Linux
#
- job: Linux
pool:
vmImage: 'ubuntu-latest'
variables:
framework: 'netcoreapp3.0'
solution: 'password-manager-access.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- bash: 'dotnet restore $(solution)'
displayName: Restore
- bash: 'dotnet build -c $(buildConfiguration) --no-restore $(solution)'
displayName: Build
- bash: 'dotnet test -c $(buildConfiguration) --framework $(framework) --logger trx --no-build $(solution)'
displayName: Test
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: VSTest
testResultsFiles: test/TestResults/*.trx
#
# Release to GitHub
#
- job: Release
dependsOn:
- Windows
- Linux
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/v')
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: 'ci/make-nuget-package.sh $(Build.SourceBranchName)'
displayName: Build package
- bash: ci/push-package-to-nuget.sh
displayName: Push package
env:
NUGET_API_KEY: $(nuget-api-key)
- task: GitHubRelease@0
inputs:
gitHubConnection: github-release
assets: $(Pipeline.Workspace)/**/*.nupkg
tagSource: manual
tag: $(Build.SourceBranchName)
- task: DotNetCoreCLI@2
condition: false
inputs:
command: push
searchPatternPush: $(Pipeline.Workspace)/**/*.nupkg
nugetFeedType: external
externalEndPoint: nuget-push