-
Notifications
You must be signed in to change notification settings - Fork 89
fix(store): give msstore a project to publish, not just a package #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -957,6 +957,12 @@ jobs: | |
| publish-msstore: | ||
| name: Publish to Microsoft Store | ||
| runs-on: windows-latest | ||
| # The workflow-wide token is `contents: write` because publish-release needs | ||
| # it. This job only reads: it checks the tree out so the CLI can identify the | ||
| # project, downloads a same-run artifact (which uses the runtime token, not | ||
| # this one), and talks to Partner Center with its own Entra credentials. | ||
| permissions: | ||
| contents: read | ||
| needs: | ||
| - build-windows-store | ||
| - publish-release | ||
|
|
@@ -999,6 +1005,24 @@ jobs: | |
| exit 1 | ||
| fi | ||
|
|
||
| # `msstore publish` takes a PROJECT root, not a package: it detects the app | ||
| # type there (Electron, via package.json) and only then accepts the built | ||
| # package through `--inputFile`. This job used to check nothing out, so | ||
| # there was no project to point it at. Checkout runs before the artifact | ||
| # download on purpose — actions/checkout cleans the workspace, and would | ||
| # delete the package if it ran after. | ||
| - name: Check out the project | ||
| if: steps.store.outputs.enabled == 'true' | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| # Nothing here pushes; the tree is only read so the CLI can see it is | ||
| # an Electron project. Left at the default, checkout writes the | ||
| # workflow's `contents: write` token into .git/config, where every | ||
| # later step can read it — including a third-party CLI action and the | ||
| # Store submission. See the job-level `permissions` above: same reason, | ||
| # other half. | ||
| persist-credentials: false | ||
|
|
||
| - name: Download Store package | ||
| if: steps.store.outputs.enabled == 'true' | ||
| uses: actions/download-artifact@v4 | ||
|
|
@@ -1031,7 +1055,11 @@ jobs: | |
| throw 'more than one .appx in the artifact — refusing to guess which one to submit' | ||
| } | ||
| Write-Output "Submitting $($appx.Name) to product $env:PRODUCT_ID" | ||
| msstore publish $appx.FullName -id $env:PRODUCT_ID | ||
| # The positional argument is the project root, NOT the package — passing | ||
| # the .appx there is what failed the first real run of this job on | ||
| # v1.9.5: "We could not find a project publisher for the project at | ||
| # ...Openscreen.Setup.1.9.5.appx". The package goes through --inputFile. | ||
| msstore publish . --inputFile $appx.FullName --appId $env:PRODUCT_ID | ||
|
Comment on lines
+1058
to
+1062
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
# Run after microsoft/microsoft-store-apppublisher@v1.1 on the Windows runner.
help="$(msstore publish --help 2>&1 || true)"
printf '%s\n' "$help"
grep -q -- '--inputFile' <<<"$help"
grep -Eiq '\.appx|appx' <<<"$help"Repository: getopenscreen/openscreen Length of output: 203 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- workflow context ---'
sed -n '970,1070p' .github/workflows/build.yml
printf '%s\n' '--- Store CLI references ---'
rg -n -i 'microsoft-store-apppublisher|msstore publish|inputFile|appx|msix|generate-appx-assets' \
.github scripts package.json electron-builder.yml electron-builder.yaml 2>/dev/null || true
printf '%s\n' '--- repository files related to packaging ---'
git ls-files | rg -i '(^|/)(appx|msix|electron-builder|generate-appx-assets)|build\.yml$' | head -200Repository: getopenscreen/openscreen Length of output: 15890 🌐 Web query:
💡 Result: According to the official Microsoft Store Developer CLI documentation, the --inputFile (or -i) option for the msstore publish command supports the following file extensions:.msix.msixupload The official documentation explicitly identifies these two formats for use with the --inputFile argument [1][2][3]. This argument specifies the path to the package file to be used for the publishing command; if the option is not provided, the CLI attempts to automatically identify the best candidate package based on the project path or URL argument provided to the command [1][2][4]. While some internal Microsoft repositories (such as StoreBroker) may reference a broader list of extensions for internal submission tools [5], the Microsoft Store Developer CLI's public-facing documentation for the publish command exclusively lists.msix and.msixupload [1][2][3]. Citations:
🌐 Web query:
💡 Result: The microsoft/microsoft-store-apppublisher GitHub Action is designed to install and configure the Microsoft Store Developer CLI (MSStoreCLI) on a runner [1][2]. Regarding your specific questions about versioning and input format: Microsoft Store Developer CLI Version The GitHub Action accepts an optional input named version, which specifies the version of the MSStoreCLI to download [2]. If this input is not provided, the action defaults to 'latest' [2]. The input is defined in the action's configuration as follows [2]: inputs: version: required: false description: "The version of the Microsoft Store CLI to be downloaded and configured (e.g. 'v0.3.0')." default: 'latest' Package Input Format The microsoft-store-apppublisher action itself does not require a specific package input format, as its primary purpose is to set up the CLI environment on the runner [1][2]. The actual package submission is performed by subsequent steps in your workflow using the msstore publish command [3][4]. When using the msstore publish command, the input format typically requires the local file path to your application package (e.g., an.msix or.msixbundle file) [3][4]. An example usage within a workflow is [3][4]: - name: Publish App package run: msstore publish '${{ github.workspace }}/release/package.msix' -id In this example, the package input is a path string pointing to the build artifact on the runner [3][4]. Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
for url in \
https://raw.githubusercontent.com/microsoft/microsoft-store-apppublisher/v1.1/action.yml \
https://raw.githubusercontent.com/microsoft/microsoft-store-apppublisher/main/action.yml \
https://raw.githubusercontent.com/microsoft/setup-msstore-cli/main/action.yml
do
printf '\n--- %s ---\n' "$url"
curl --fail --silent --show-error --location "$url" | sed -n '1,180p'
done
printf '\n--- official command documentation excerpts ---\n'
curl --fail --silent --show-error --location \
https://raw.githubusercontent.com/MicrosoftDocs/windows-dev-docs/docs/hub/apps/publish/msstore-dev-cli/commands.md |
rg -n -i -C 5 'inputFile|msixupload|\.msix|\.appx|publish'Repository: getopenscreen/openscreen Length of output: 15722 🌐 Web query:
💡 Result: The term inputFile in the context of the Microsoft Store Developer CLI (msstore-cli) refers to the path argument used in the publish command [1]. Specifically, the command Citations:
Use a package format supported by The workflow selects an 🤖 Prompt for AI Agents |
||
|
|
||
| # Report what happened, not what was configured. Keyed off `enabled` alone | ||
| # under always(), this claimed "Submitted to the Store" when `msstore | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.