Skip to content

Instantly share code, notes, and snippets.

@ianrathbone
Created March 25, 2021 15:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianrathbone/d2a1cc7d9a0e199083a6f1da4c6502e7 to your computer and use it in GitHub Desktop.
Save ianrathbone/d2a1cc7d9a0e199083a6f1da4c6502e7 to your computer and use it in GitHub Desktop.
name: $(majorMinorVersion).$(rev:r)
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
majorMinorVersion: '1.0'
PackagesToPack: publish.nuspec
steps:
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- task: NuGetCommand@2
displayName: 'nuget pack'
inputs:
command: 'pack'
packagesToPack: $(PackagesToPack)
versioningScheme: byBuildNumber
packDestination: '$(Build.ArtifactStagingDirectory)'
- task: NuGetCommand@2
displayName: 'nuget push'
inputs:
command: 'push'
feedsToUse: 'select'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'ARMTemplatesFeed'
versioningScheme: 'off'
allowPackageConflicts: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment