Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
add release.yml which contains steps to push and release to psgallery
Browse files Browse the repository at this point in the history
  • Loading branch information
anamnavi committed Mar 3, 2022
1 parent ab5cfd9 commit 002df68
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .ci/release.yml
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

0 comments on commit 002df68

Please sign in to comment.