-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
95 lines (77 loc) · 2.71 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
trigger:
- master
# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
repositories:
- repository: templates
type: github
name: nanoframework/nf-tools
endpoint: 'nanoframework-nanoFramework.SIM800H'
# need to build on VS2017 until the VS2019 issue with RESX is available
pool:
vmImage: 'VS2019'
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
solution: 'nanoFramework.SIM800H.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- checkout: self
- checkout: git://InternalFeed/Babel.Obfuscator
fetchDepth: 1
- script: |
git config --global core.autocrlf true
displayName: Setup git identity
- template: nb-gitversioning.yml@templates
- template: install-nuget.yml@templates
- task: NuGetCommand@2
condition: succeeded()
displayName: NuGet restore
inputs:
restoreSolution: '$(solution)'
feedsToUse: config
nugetConfigPath: '$(System.TeamProject)\NuGet.config'
- task: InstallnFBuildComponents@1
condition: ne( variables['StartReleaseCandidate'], true )
displayName: Install nanoFramework MSBuild components
- task: VSBuild@1
condition: ne( variables['StartReleaseCandidate'], true )
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
msbuildArgs: '/p:PublicRelease=true'
configuration: '$(buildConfiguration)'
- task: NuGetCommand@2
condition: succeeded()
displayName: Pack NuGet with class library
inputs:
command: 'custom'
arguments: 'pack $(Build.SourcesDirectory)\$(System.TeamProject)\nuspec\Eclo.nanoFramework.Sim800H.nuspec -Version $(NBGV_Version) -BasePath $(Build.SourcesDirectory)\$(System.TeamProject)'
- task: CopyFiles@1
condition: succeeded()
displayName: Collecting deployable artifacts
inputs:
sourceFolder: $(Build.SourcesDirectory)
Contents: |
**\Eclo.nanoFramework.Sim800H*.nupkg
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
# publish artifacts (only possible if this is not a PR originated on a fork)
- task: PublishBuildArtifacts@1
condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) )
displayName: Publish deployables artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: deployables
ArtifactType: Container
# push NuGet class lib package to NuGet (always happens except on PR builds)
- task: NuGetCommand@2
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
continueOnError: true
displayName: Push NuGet packages to NuGet
inputs:
command: push
nuGetFeedType: external
allowPackageConflicts: true
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
publishFeedCredentials: 'nuget-nanoFramework.SIM800H'