fix(release): configure Store CLI before settings

This commit is contained in:
2026-07-31 04:51:31 +02:00
parent e0fb84ccb9
commit 51bf0abba2
2 changed files with 19 additions and 4 deletions

View File

@@ -295,10 +295,6 @@ jobs:
SELLER_ID: ${{ secrets.SELLER_ID }} SELLER_ID: ${{ secrets.SELLER_ID }}
MICROSOFT_STORE_PRODUCT_ID: ${{ vars.MICROSOFT_STORE_PRODUCT_ID }} MICROSOFT_STORE_PRODUCT_ID: ${{ vars.MICROSOFT_STORE_PRODUCT_ID }}
run: | run: |
msstore settings --enableTelemetry false
if ($LASTEXITCODE -ne 0) {
throw "Failed to disable Microsoft Store CLI telemetry"
}
msstore reconfigure ` msstore reconfigure `
--tenantId "$env:AZURE_AD_TENANT_ID" ` --tenantId "$env:AZURE_AD_TENANT_ID" `
--sellerId "$env:SELLER_ID" ` --sellerId "$env:SELLER_ID" `
@@ -307,6 +303,10 @@ jobs:
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "Microsoft Store authentication failed" throw "Microsoft Store authentication failed"
} }
msstore settings --enableTelemetry false
if ($LASTEXITCODE -ne 0) {
throw "Failed to disable Microsoft Store CLI telemetry"
}
msstore apps get "$env:MICROSOFT_STORE_PRODUCT_ID" msstore apps get "$env:MICROSOFT_STORE_PRODUCT_ID"
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "The Microsoft Store application is not accessible" throw "The Microsoft Store application is not accessible"

View File

@@ -25,6 +25,21 @@ grep -F 'run: make build-apple-dmg' \
exit 1 exit 1
} }
store_reconfigure_line="$(
awk '/msstore reconfigure/ {print NR; exit}' \
"$repo_root/.github/workflows/release.yml"
)"
store_settings_line="$(
awk '/msstore settings --enableTelemetry false/ {print NR; exit}' \
"$repo_root/.github/workflows/release.yml"
)"
[[ -n $store_reconfigure_line &&
-n $store_settings_line &&
$store_reconfigure_line -lt $store_settings_line ]] || {
printf 'Microsoft Store CLI credentials must be configured before changing settings\n' >&2
exit 1
}
signing_line="$( signing_line="$(
awk '/sign-exported-app\.sh/ {print NR; exit}' \ awk '/sign-exported-app\.sh/ {print NR; exit}' \
"$repo_root/apple/scripts/build-dmg.sh" "$repo_root/apple/scripts/build-dmg.sh"