Skip to content

Instantly share code, notes, and snippets.

@jeffpatton1971
Created August 11, 2020 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffpatton1971/0e9eb0771680e266900e83f9dfc095d3 to your computer and use it in GitHub Desktop.
Save jeffpatton1971/0e9eb0771680e266900e83f9dfc095d3 to your computer and use it in GitHub Desktop.
trigger: none
pool:
vmImage: 'windows-2019'
resources:
repositories:
- repository: tools
type: github
name: Azure-Devops-PowerShell-Module/tools
endpoint: github.com
ref: refs/heads/master
- repository: core
type: github
name: Azure-Devops-PowerShell-Module/core
endpoint: github.com
ref: refs/heads/master
stages:
- stage: PackageAndDeployment
jobs:
- job: Packaging
displayName: 'nuGet Specfile Creation'
steps:
- checkout: tools
- checkout: core
- powershell: |
$WorkingPath = $pwd;
$toolsPath = "$($WorkingPath)\tools";
$modulePath = "$($WorkingPath)\core";
Set-Location $toolsPath;
.\ConvertTo-NuSpec.ps1 -ManifestPath "$($modulePath)\core.psd1"
displayName: 'Create nuSpec'
errorActionPreference: Stop
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: pack
packagesToPack: '$(BUILD.REPOSITORY.LOCALPATH)\core\core.nuspec'
packDestination: '$(BUILD.REPOSITORY.LOCALPATH)\core'
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
packagesToPush: '$(BUILD.REPOSITORY.LOCALPATH)\core\*.nupkg;'
nuGetFeedType: external
publishFeedCredentials: poshGallery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment