diff --git a/.github/workflows/release-windows-store.yml b/.github/workflows/release-windows-store.yml
index b024514afe..26b1df74a9 100644
--- a/.github/workflows/release-windows-store.yml
+++ b/.github/workflows/release-windows-store.yml
@@ -124,7 +124,7 @@ jobs:
run: |
cd builds
- REM We need to provide a signed .appx to the Windows Store, so generate a certificate with password 'password'
+ REM We need to provide a signed .msix to the Windows Store, so generate a certificate with password 'password'
call ..\os\windows\winstore\generate-key.bat "CN=78024DA8-4BE4-4C77-B12E-547BBF7359D2" password cert.pfx
- name: Generate assets
@@ -176,13 +176,13 @@ jobs:
REM Build and sign the package
makeappx build /v /f PackagingLayout.xml /op output\ /bv %OTTD_VERSION% /pv %OTTD_VERSION% /ca
- SignTool sign /fd sha256 /a /f cert.pfx /p password "output\OpenTTD.appxbundle"
+ SignTool sign /fd sha256 /a /f cert.pfx /p password "output\OpenTTD.msixbundle"
REM Move resulting files to bundles folder
mkdir bundles
mkdir bundles\internal
move cert.pfx bundles\internal\openttd-${{ inputs.version }}-windows-store.pfx
- move output\OpenTTD.appxbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.appxbundle
+ move output\OpenTTD.msixbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.msixbundle
- name: Store bundles
uses: actions/upload-artifact@v5
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ffbad50df7..383145da42 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -153,3 +153,18 @@ jobs:
with:
version: ${{ needs.source.outputs.version }}
+
+ upload-windows-store:
+ name: Upload (Windows Store)
+ needs:
+ - upload
+
+ # Only upload final release builds to Windows Store; "-beta" or "-RC" tags should be ignored
+ if: needs.source.outputs.is_tag == 'true' && !contains(needs.source.outputs.version, '-')
+
+ uses: ./.github/workflows/upload-windows-store.yml
+ secrets: inherit
+
+ with:
+ version: ${{ needs.source.outputs.version }}
+ trigger_type: ${{ needs.source.outputs.trigger_type }}
diff --git a/.github/workflows/upload-windows-store.yml b/.github/workflows/upload-windows-store.yml
new file mode 100644
index 0000000000..c1716d9174
--- /dev/null
+++ b/.github/workflows/upload-windows-store.yml
@@ -0,0 +1,44 @@
+name: Upload (Windows Store)
+
+on:
+ workflow_call:
+ inputs:
+ version:
+ required: true
+ type: string
+ trigger_type:
+ required: true
+ type: string
+
+jobs:
+ upload:
+ name: Upload (Windows Store)
+
+ runs-on: windows-latest
+
+ steps:
+ - name: Download bundle (Windows Store)
+ uses: actions/download-artifact@v6
+ with:
+ name: openttd-windows-store
+ path: openttd-windows-store
+
+ - name: Configure Microsoft Store CLI
+ uses: microsoft/microsoft-store-apppublisher@v1.1
+
+ - name: Reconfigure store credentials
+ run: msstore reconfigure `
+ --tenantId ${{ secrets.AZURE_TENANT_ID }} `
+ --sellerId ${{ secrets.WINSTORE_SELLER_ID }} `
+ --clientId ${{ secrets.AZURE_WINSTORE_APPLICATION_CLIENT_ID }} `
+ --clientSecret ${{ secrets.AZURE_WINSTORE_APPLICATION_SECRET }}
+
+ - name: Publish msix package
+ shell: pwsh
+ run: |
+ $bundle = Get-ChildItem openttd-windows-store/internal/openttd-*.msixbundle | Select-Object -First 1
+ if (-not $bundle) {
+ throw "No msixbundle found"
+ }
+
+ msstore publish $bundle.FullName -id 9NCJG5RVRR1C -v
diff --git a/os/windows/winstore/manifests/AssetsPackage.appxmanifest b/os/windows/winstore/manifests/AssetsPackage.appxmanifest
index a0e8f29eda..e37462c2ce 100644
--- a/os/windows/winstore/manifests/AssetsPackage.appxmanifest
+++ b/os/windows/winstore/manifests/AssetsPackage.appxmanifest
@@ -63,6 +63,6 @@
-
+
diff --git a/os/windows/winstore/manifests/Package.appxmanifest b/os/windows/winstore/manifests/Package.appxmanifest
index 7eb4a5c2b7..861250af9c 100644
--- a/os/windows/winstore/manifests/Package.appxmanifest
+++ b/os/windows/winstore/manifests/Package.appxmanifest
@@ -7,7 +7,7 @@
Assets\StoreLogo.png
-
+