This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add release.yml which contains steps to push and release to psgallery
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
parameters: | ||
jobName: release | ||
displayName: 'Release PowerShellGet to PSGallery' | ||
|
||
jobs: | ||
- job: ${{ parameters.jobName }} | ||
pool: | ||
name: 1ES | ||
demands: | ||
- ImageOverride -equals PSMMS2019-Secure | ||
displayName: ${{ parameters.displayName }} | ||
|
||
steps: | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: 'Download PowerShellGet module artifacts' | ||
inputs: | ||
artifact: nupkg | ||
patterns: '**/PowerShellGet*.nupkg' | ||
downloadPath: '$(Pipeline.Workspace)/nuget' | ||
|
||
- powershell: | | ||
$package = (Get-ChildItem '$(Pipeline.Workspace)/nuget/PowerShellGet.*.nupkg').FullName | ||
$package | ||
$vstsCommandString = "vso[task.setvariable variable=NugetPkgPath]${package}" | ||
Write-Host "sending " + $vstsCommandString | ||
Write-Host "##$vstsCommandString" | ||
displayName: 'Capture PowerShellGet module NuGet package path and set environment variable' | ||
- task: NuGetCommand@2 | ||
displayName: 'Push PowerShellGet module artifacts to PSGallery feed' | ||
inputs: | ||
command: push | ||
packagesToPush: '$(NugetPkgPath)' | ||
nuGetFeedType: external | ||
publishFeedCredentials: PSGalleryPush |