-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines-photino.net.server-dev.yml
67 lines (57 loc) · 2.24 KB
/
azure-pipelines-photino.net.server-dev.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
# Build Photino.NET.Server project from dev branch in GitHub
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- debug
variables:
versionprefix: 0.9.0
jobs:
- job: 'BuildPackageAndPublish'
pool:
vmImage: windows-latest
variables:
buildConfiguration: 'Debug'
steps:
- task: UseDotNet@2
displayName: 'Use .NET 9 sdk'
inputs:
packageType: sdk
version: 9.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: NuGetAuthenticate@1
displayName: 'NuGet Authenticate'
#Build and Create NuGet package
- task: CmdLine@2
displayName: 'Build and Create NuGet package'
inputs:
script: 'dotnet pack Photino.NET.Server/Photino.NET.Server.csproj -c $(buildConfiguration) --include-symbols /p:Version=$(versionprefix)-dev-$(Build.BuildNumber) /p:PackageVersion=$(versionprefix)-dev-$(Build.BuildNumber)'
#Publish NuGet package to Artifacts
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
feedsToUse: 'select'
publishVstsFeed: 'Photino.Native/PhotinoPackages'
packagesToPush: 'Photino.NET.Server/bin/$(buildConfiguration)/*.nupkg'
allowPackageConflicts: true
# Uploads the NuGet package file to nuget.org
# Important notes:
# 1. For this to work, you need to create a 'service connection' with the same name
# as the 'publishFeedCredentials' value.
# 2. For security, you *must* ensure that 'Make secrets available to builds of forks'
# is disabled in your PR validation settings (inside build -> Edit -> Triggers).
# Otherwise, PRs would be able to push new packages even without being merged.
#- job: 'PublishToNuGet'
# dependsOn: 'CombinePackages'
# steps:
# - task: DownloadBuildArtifacts@0
# inputs:
# downloadPath: 'artifacts'
# artifactName: 'artifacts-combined'
# - task: NuGetCommand@2
# displayName: 'Publish to nuget.org'
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# command: push
# packagesToPush: 'artifacts/artifacts-combined/*.nupkg'
# nuGetFeedType: external
# publishFeedCredentials: 'WebWindowNuGet'