Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/ci_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: $(BuildDefinitionName)-$(date:yyMM).$(date:dd)$(rev:rrr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
batch: false
branches:
include:
- master
Expand Down Expand Up @@ -205,7 +205,7 @@ stages:
imageName: macOS-latest

- stage: Release
displayName: Release Package
displayName: Release Package to PSGallery
condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), eq(variables['Publish'], 'True'))
jobs:
- template: release.yml
55 changes: 22 additions & 33 deletions .ci/release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
parameters:
jobName: release
imageName: windows-2019
displayName: 'Release Microsoft.PowerShell.SecretStore to NuGet'
displayName: 'Release Microsoft.PowerShell.SecretStore to PSGallery'

jobs:
- job: ${{ parameters.jobName }}
pool:
vmImage: ${{ parameters.imageName }}
name: 1ES
demands:
- ImageOverride -equals MMS2019
displayName: ${{ parameters.displayName }}

steps:
- task: NuGetToolInstaller@1
displayName: 'Install NuGet 5.6.0'
inputs:
checkLatest: false
version: 5.6.0

- task: DownloadBuildArtifacts@0
displayName: 'Download SecretSTore module artifacts'
- task: DownloadPipelineArtifact@2
displayName: 'Download SecretStore module artifacts'
inputs:
buildType: current
downloadType: specific
artifactName: '**/*.nupkg'
downloadPath: '$(System.ArtifactsDirectory)'
artifact: nugetpkg
patterns: '**/*.nupkg'
downloadPath: '$(Pipeline.Workspace)/nuget'

- powershell: |
Get-ChildItem '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.SecretStore.*.nupkg' -ErrorAction SilentlyContinue
# Get-ChildItem '$(System.ArtifactsDirectory)' -Recurse
displayName: 'Capture SecretStore module NuGet package'

# TODO: Need to create NuGet service connection
#- task: NuGetCommand@2
# displayName: 'Push Microsoft.PowerShell.Store module artifacts to AzArtifactsFeed'
# inputs:
# command: push
# packagesToPush: '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.SecretStore.*.nupkg'
# nuGetFeedType: external
# publishFeedCredentials: AzArtifactFeed
$package = (Get-ChildItem '$(Pipeline.Workspace)/nuget/Microsoft.PowerShell.SecretStore.*.nupkg').FullName
$package
$vstsCommandString = "vso[task.setvariable variable=NugetPkgPath]${package}"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
displayName: 'Capture SecretStore module NuGet package path and set environment variable'

#- task: NuGetCommand@2
# displayName: 'Push Microsoft.PowerShell.Store module artifacts to PSGallery feed'
# inputs:
# command: push
# packagesToPush: '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.SecretStore.*.nupkg'
# nuGetFeedType: external
# publishFeedCredentials: PHPowerShellGalleryFeed
- task: NuGetCommand@2
displayName: 'Push Microsoft.PowerShell.Store module artifacts to PSGallery feed'
inputs:
command: push
packagesToPush: '$(NugetPkgPath)'
nuGetFeedType: external
publishFeedCredentials: PSGalleryPush