-
Notifications
You must be signed in to change notification settings - Fork 17
/
azure-pipelines.yml
50 lines (43 loc) · 1.3 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
jobs:
- job: macOs
pool:
name: Hosted macOS
steps:
- template: .azure/build.yml
- job: linux
pool:
name: Hosted Ubuntu 1604
steps:
- template: .azure/build.yml
- script: curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -channel 1.1
displayName: Installing .netcore 1.1
- template: .azure/tests.yml
parameters:
netcore1Global: false
- job: win
dependsOn:
- macOs
- linux
pool:
name: Hosted VS2017
steps:
- template: .azure/build.yml
- task: PowerShell@2
displayName: pack nuget package
inputs:
targetType: inline
script: |
$version = $(git describe --tags | %{$_ -replace '-([^g])', '.$1'})
dotnet pack --no-build -v minimal -c Release /property:Version=$version /property:PackageOutputPath=$(Build.ArtifactStagingDirectory)
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- task: NuGetCommand@2
displayName: push nuget packages
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: api.nuget.org
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: nupkgs