-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
49 lines (45 loc) · 1.09 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
variables:
- group: ApiKeys
trigger:
- main
stages:
- stage: Build
jobs:
- job: Unix
strategy:
matrix:
Linux:
vmImage: 'ubuntu-latest'
MacOS:
vmImage: 'macOS-latest'
pool:
vmImage: $(vmImage)
steps:
- script: bash ./ci_build_unix.sh
- publish: 'PublishOutput/'
artifact: NuGets$(vmImage)
- job: Win
pool:
vmImage: 'vs2017-win2016'
steps:
- powershell: .\ci_build.ps1
- publish: 'PublishOutput/'
artifact: NuGetsWin
- stage: Deploy
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: NuGetDeploy
displayName: Push NuGet Packages
pool:
vmImage: 'Ubuntu-latest'
environment: 'live-nuget'
strategy:
runOnce:
deploy:
steps:
- download: current
patterns: '**/*.nupkg'
- script: |
dotnet nuget push --api-key $API_KEY --source "https://api.nuget.org/v3/index.json" $(Pipeline.Workspace)/**/*.nupkg
env:
API_KEY: $(NuGetOrgApiKey)