This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
release-pipeline.yml
49 lines (41 loc) · 1.47 KB
/
release-pipeline.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
# Copyright (c) 2020 Allan Mobley. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
trigger:
tags:
include:
- v*
# no PR triggers
pr: none
pool:
vmImage: 'ubuntu-latest'
steps:
# Specify a particular version of the .NET SDK
- task: UseDotNet@2
displayName: 'Set SDK'
inputs:
packageType: sdk
version: 3.1.300
installationPath: $(Agent.ToolsDirectory)/dotnet
# Build samples. Not strictly required to create the package,
# but we want the pipeline to halt if this step fails.
- script: dotnet build --configuration Release
workingDirectory: samples/Default.Cosmos.Identity.Razor.Sample
displayName: Build Default.Cosmos.Identity.Razor.Sample
- script: dotnet build --configuration Release
workingDirectory: samples/Extended.Cosmos.Identity.Razor.Sample
displayName: Build Extended.Cosmos.Identity.Razor.Sample
# Create the NuGet package file
- script: dotnet pack --configuration Release
workingDirectory: src
displayName: Pack Src
# Upload the NuGet package file to nuget.org
# Important notes:
# For this to work, you need to create a 'service connection' in Azure Pipelines with the same name
# as the 'publishFeedCredentials' value, or use the name of one you already have in place.
- task: NuGetCommand@2
displayName: Push Src
inputs:
command: push
packagesToPush: 'src/bin/Release/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: 'Mobsites Packages'