From 5e051759984c7be3c2274810ad3befb46cc76d03 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:51:44 -0500 Subject: [PATCH] Make MSIX publish stage dependent on SetReleaseTagandContainerName stage --- .pipelines/PowerShell-Release-Official.yml | 6 ++++-- .pipelines/templates/package-create-msix.yml | 14 +++++++------- .pipelines/templates/release-MSIX-Publish.yml | 17 ++++++++++++----- .pipelines/templates/release-githubNuget.yml | 4 ++-- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.pipelines/PowerShell-Release-Official.yml b/.pipelines/PowerShell-Release-Official.yml index c54fc99a0b..ca6b79335d 100644 --- a/.pipelines/PowerShell-Release-Official.yml +++ b/.pipelines/PowerShell-Release-Official.yml @@ -365,10 +365,12 @@ extends: This is typically done by the community 1-2 days after the release. - stage: PublishMsix - dependsOn: PushGitTagAndMakeDraftPublic + dependsOn: + - setReleaseTagAndChangelog + - PushGitTagAndMakeDraftPublic displayName: Publish MSIX to store variables: - ob_release_environment: Production + ob_release_environment: ${{ variables.releaseEnvironment }} jobs: - template: /.pipelines/templates/release-MSIX-Publish.yml@self parameters: diff --git a/.pipelines/templates/package-create-msix.yml b/.pipelines/templates/package-create-msix.yml index d9d06260f4..e464b61223 100644 --- a/.pipelines/templates/package-create-msix.yml +++ b/.pipelines/templates/package-create-msix.yml @@ -97,13 +97,13 @@ jobs: displayName: Create MsixBundle retryCountOnTaskFailure: 1 - # - task: onebranch.pipeline.signing@1 - # displayName: Sign MsixBundle - # inputs: - # command: 'sign' - # signing_profile: $(MSIXProfile) - # files_to_sign: '**/*.msixbundle' - # search_root: '$(BundleDir)' + - task: onebranch.pipeline.signing@1 + displayName: Sign MsixBundle + inputs: + command: 'sign' + signing_profile: $(MSIXProfile) + files_to_sign: '**/*.msixbundle' + search_root: '$(BundleDir)' - pwsh: | $signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml index 08123ea807..4d3e0cb41c 100644 --- a/.pipelines/templates/release-MSIX-Publish.yml +++ b/.pipelines/templates/release-MSIX-Publish.yml @@ -22,6 +22,8 @@ jobs: - name: PREVIEW value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ] - template: ./variable/release-shared.yml@self + parameters: + RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ] steps: - task: PowerShell@2 inputs: @@ -41,14 +43,14 @@ jobs: } $middleURL = '' $tagString = "$(ReleaseTag)" - if ($tagString -match '-') { + if ($tagString -match '-preview') { $middleURL = "preview" } elseif ($tagString -match '(\d+\.\d+)') { $middleURL = $matches[1] } - $endURL = $tagString -replace '[v\.]','' + $endURL = $tagString -replace '^v|\.', '' $message = "Changelog: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL" Write-Verbose -Verbose "Release Notes for the Store:" Write-Verbose -Verbose "$message" @@ -88,7 +90,7 @@ jobs: displayName: 'Publish LTS StoreBroker Package' condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['LTS'], 'true')) inputs: - serviceEndpoint: 'StoreAppPublish-Stable' + serviceEndpoint: 'StoreAppPublish-Private' appId: '$(AppID-LTS)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' @@ -101,7 +103,7 @@ jobs: displayName: 'Publish Stable StoreBroker Package' condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['STABLE'], 'true')) inputs: - serviceEndpoint: 'StoreAppPublish-Stable' + serviceEndpoint: 'StoreAppPublish-Private' appId: '$(AppID-Stable)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' @@ -114,7 +116,7 @@ jobs: displayName: 'Publish Preview StoreBroker Package' condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['PREVIEW'], 'true')) inputs: - serviceEndpoint: 'StoreAppPublish-Preview' + serviceEndpoint: 'StoreAppPublish-Private' appId: '$(AppID-Preview)' inputMethod: JsonAndZip jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json' @@ -122,3 +124,8 @@ jobs: numberOfPackagesToKeep: 2 jsonZipUpdateMetadata: true targetPublishMode: 'Immediate' + + - pwsh: | + Get-Content -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue + displayName: Upload Store Failure Log + condition: failed() diff --git a/.pipelines/templates/release-githubNuget.yml b/.pipelines/templates/release-githubNuget.yml index a8a874619a..5f67ce6a9e 100644 --- a/.pipelines/templates/release-githubNuget.yml +++ b/.pipelines/templates/release-githubNuget.yml @@ -121,13 +121,13 @@ jobs: $middleURL = '' $tagString = "$(ReleaseTag)" Write-Verbose -Verbose "Use the following command to push the tag:" - if ($tagString -match '-') { + if ($tagString -match '-preview') { $middleURL = "preview" } elseif ($tagString -match '(\d+\.\d+)') { $middleURL = $matches[1] } - $endURL = $tagString -replace '[v\.]','' + $endURL = $tagString -replace '^v|\.', '' $message = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL" Write-Verbose -Verbose "git tag -a $(ReleaseTag) $env:BUILD_SOURCEVERSION -m $message" displayName: Git Push Tag Command