mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-27 11:17:31 +02:00
Add NuGet push
This commit is contained in:
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
.runsettings = .runsettings
|
.runsettings = .runsettings
|
||||||
azure-pipelines-linux.yml = azure-pipelines-linux.yml
|
azure-pipelines-linux.yml = azure-pipelines-linux.yml
|
||||||
|
azure-pipelines-nuget.yml = azure-pipelines-nuget.yml
|
||||||
azure-pipelines.yml = azure-pipelines.yml
|
azure-pipelines.yml = azure-pipelines.yml
|
||||||
build-info.md = build-info.md
|
build-info.md = build-info.md
|
||||||
CHANGELOG.md = CHANGELOG.md
|
CHANGELOG.md = CHANGELOG.md
|
||||||
|
|||||||
46
azure-pipelines-nuget.yml
Normal file
46
azure-pipelines-nuget.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
pool:
|
||||||
|
vmImage: 'vs2017-win2016'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
Prerelease: 'ci'
|
||||||
|
buildId: "1$(Build.BuildId)"
|
||||||
|
buildProjects: '**/src/**/*.csproj'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Print buildId
|
||||||
|
- script: |
|
||||||
|
echo "BuildId = $(buildId)"
|
||||||
|
displayName: 'Print buildId'
|
||||||
|
|
||||||
|
# Based on https://whereslou.com/2018/09/versioning-and-publishing-nuget-packages-automatically-using-azure-devops-pipelines/
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Build Release
|
||||||
|
inputs:
|
||||||
|
command: 'build'
|
||||||
|
arguments: /p:Configuration=Release # https://github.com/MicrosoftDocs/vsts-docs/issues/1976
|
||||||
|
projects: $(buildProjects)
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Pack
|
||||||
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
|
inputs:
|
||||||
|
command: pack
|
||||||
|
configuration: 'Release'
|
||||||
|
packagesToPack: $(buildProjects)
|
||||||
|
nobuild: true
|
||||||
|
packDirectory: '$(Build.ArtifactStagingDirectory)/packages'
|
||||||
|
verbosityPack: 'normal'
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Publish Artifacts
|
||||||
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Push to NuGet
|
||||||
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
|
inputs:
|
||||||
|
command: custom
|
||||||
|
custom: nuget
|
||||||
|
arguments: push $(Build.ArtifactStagingDirectory)\packages\*.nupkg --source https://api.nuget.org/v3/index.json --nuget-api-key $(NuGetKey) --skip-duplicate
|
||||||
Reference in New Issue
Block a user