mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[release/v7.4] Backport Store publishing improvements (#26401)
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>
This commit is contained in:
co-authored by
Justin Chung
parent
cd673a3cdf
commit
08f807874e
@@ -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:
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
"packageParameters": {
|
||||
"PDPRootPath": "",
|
||||
"Release": "",
|
||||
"PDPInclude": [],
|
||||
"PDPInclude": [
|
||||
"PDP.xml"
|
||||
],
|
||||
"PDPExclude": [],
|
||||
"LanguageExclude": [
|
||||
"default",
|
||||
@@ -21,7 +23,7 @@
|
||||
},
|
||||
"appSubmission": {
|
||||
"productId": "",
|
||||
"targetPublishMode": "NotSet",
|
||||
"targetPublishMode": "Immediate",
|
||||
"targetPublishDate": null,
|
||||
"visibility": "NotSet",
|
||||
"pricing": {
|
||||
|
||||
@@ -8,6 +8,10 @@ jobs:
|
||||
- group: msixTools
|
||||
- group: 'Azure Blob variable group'
|
||||
- group: 'Store Publish Variables'
|
||||
- name: ob_sdl_credscan_suppressionsFile
|
||||
value: $(Build.SourcesDirectory)\PowerShell\.config\suppress.json
|
||||
- name: ob_sdl_tsa_configFile
|
||||
value: $(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
|
||||
- name: ob_outputDirectory
|
||||
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
|
||||
|
||||
@@ -137,16 +141,19 @@ jobs:
|
||||
'LTS' = @{
|
||||
AppStoreName = 'PowerShell-LTS'
|
||||
ProductId = '$(productId-LTS)'
|
||||
AppId = '$(AppID-LTS)'
|
||||
ServiceEndpoint = "StoreAppPublish-Stable"
|
||||
}
|
||||
'Stable' = @{
|
||||
AppStoreName = 'PowerShell'
|
||||
ProductId = '$(productId-Stable)'
|
||||
AppId = '$(AppID-Stable)'
|
||||
ServiceEndpoint = "StoreAppPublish-Stable"
|
||||
}
|
||||
'Preview' = @{
|
||||
AppStoreName = 'PowerShell (Preview)'
|
||||
ProductId = '$(productId-Preview)'
|
||||
AppId = '$(AppID-Preview)'
|
||||
ServiceEndpoint = "StoreAppPublish-Preview"
|
||||
}
|
||||
}
|
||||
@@ -171,16 +178,21 @@ jobs:
|
||||
|
||||
[xml]$pdpXml = Get-Content $pdpPath -Raw
|
||||
|
||||
$appStoreNameElement = $pdpXml.SelectSingleNode("//AppStoreName[@_locID]")
|
||||
# Create namespace manager for XML with default namespace
|
||||
$nsManager = New-Object System.Xml.XmlNamespaceManager($pdpXml.NameTable)
|
||||
$nsManager.AddNamespace("pd", "http://schemas.microsoft.com/appx/2012/ProductDescription")
|
||||
|
||||
$appStoreNameElement = $pdpXml.SelectSingleNode("//pd:AppStoreName", $nsManager)
|
||||
if ($appStoreNameElement) {
|
||||
$appStoreNameElement.InnerText = $config.AppStoreName
|
||||
Write-Verbose -Verbose "Updated AppStoreName to: $($config.AppStoreName)"
|
||||
$appStoreNameElement.SetAttribute("_locID", $config.AppStoreName)
|
||||
Write-Verbose -Verbose "Updated AppStoreName _locID to: $($config.AppStoreName)"
|
||||
} else {
|
||||
Write-Warning "AppStoreName element not found in PDP file"
|
||||
}
|
||||
|
||||
$pdpXml.Save($pdpPath)
|
||||
Write-Verbose -Verbose "PDP file updated successfully"
|
||||
Get-Content -Path $pdpPath | Write-Verbose -Verbose
|
||||
} else {
|
||||
Write-Error "PDP file not found: $pdpPath"
|
||||
exit 1
|
||||
@@ -198,6 +210,7 @@ jobs:
|
||||
|
||||
$sbConfigJson | ConvertTo-Json -Depth 100 | Set-Content $sbConfigPath -Encoding UTF8
|
||||
Write-Verbose -Verbose "SBConfig file updated successfully"
|
||||
Get-Content -Path $sbConfigPath | Write-Verbose -Verbose
|
||||
} else {
|
||||
Write-Error "SBConfig file not found: $sbConfigPath"
|
||||
exit 1
|
||||
@@ -237,6 +250,12 @@ jobs:
|
||||
pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
|
||||
pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
|
||||
|
||||
- pwsh: |
|
||||
Get-Item -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue |
|
||||
Copy-Item -Destination "$(ob_outputDirectory)" -Verbose
|
||||
displayName: Upload Store Failure Log
|
||||
condition: failed()
|
||||
|
||||
- pwsh: |
|
||||
$submissionPackageDir = "$(System.DefaultWorkingDirectory)/SBOutDir"
|
||||
$jsonFile = "$submissionPackageDir/PowerShellStorePackage.json"
|
||||
|
||||
@@ -15,12 +15,15 @@ jobs:
|
||||
artifactName: drop_msixbundle_CreateMSIXBundle
|
||||
variables:
|
||||
- group: 'Store Publish Variables'
|
||||
- name: LTS
|
||||
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsLTS'] ]
|
||||
- name: STABLE
|
||||
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsStable'] ]
|
||||
- name: PREVIEW
|
||||
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ]
|
||||
- template: ./variable/release-shared.yml@self
|
||||
parameters:
|
||||
RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ]
|
||||
LTS: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsLTS'] ]
|
||||
STABLE: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsStable'] ]
|
||||
PREVIEW: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ]
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
inputs:
|
||||
@@ -40,7 +43,7 @@ jobs:
|
||||
}
|
||||
$middleURL = ''
|
||||
$tagString = "$(ReleaseTag)"
|
||||
if ($tagString -match '-') {
|
||||
if ($tagString -match '-preview') {
|
||||
$middleURL = "preview"
|
||||
}
|
||||
elseif ($tagString -match '(\d+\.\d+)') {
|
||||
|
||||
Reference in New Issue
Block a user