Created
August 11, 2020 18:33
-
-
Save jeffpatton1971/0e9eb0771680e266900e83f9dfc095d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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