-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Template publication automation #43659
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
Open
chatasweetie
wants to merge
8
commits into
main
Choose a base branch
from
template-automation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a0a6f99
update template for publish items in appxmanifest & .csproj
chatasweetie e6d541a
add configuration for microsoft store and msix building to template
chatasweetie e87d1fe
add Publication scripts for Microsoft Store and WinGet template
chatasweetie 066c324
correct typo of pubishing and removed my from myextension
chatasweetie ca211be
correct typo of pubishing and removed my from myextension
chatasweetie 437211b
Merge branch 'template-automation' of https://github.com/microsoft/Po…
chatasweetie 1fc14a2
Update check-spelling metadata
chatasweetie a0f35c4
Merge branch 'main' into template-automation
chatasweetie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
...emplateCmdPalExtension/TemplateCmdPalExtension/Publication/PublicationREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| # Publication Setup | ||
|
|
||
| This folder contains tools to help you prepare your CmdPal extension for publication to the Microsoft Store and WinGet. | ||
|
|
||
| ## Files and Folders in this Directory | ||
|
|
||
| ### Scripts | ||
|
|
||
| - **`one-time-store-publishing-setup.ps1`** - Configure your project for Microsoft Store publishing (run once) | ||
| - **`build-msix-bundles.ps1`** - Build MSIX packages and create bundles for Store submission | ||
| - **`one-time-winget-publishing-setup.ps1`** - Configure your project for WinGet publishing (run once) | ||
|
|
||
| ### Resource Folders | ||
|
|
||
| - **`microsoft-store-resources/`** - Contains files used for Microsoft Store publishing: | ||
| - `bundle_mapping.txt` - Auto-generated file that maps MSIX files for bundle creation | ||
|
|
||
| - **`winget-resources/`** - Contains templates and scripts for WinGet publishing: | ||
| - `build-exe.ps1` - Script to build standalone EXE installer | ||
| - `setup-template.iss` - Inno Setup installer template | ||
| - `release-extension.yml` - GitHub Actions workflow template (moved to `.github/workflows/` during setup) | ||
| - `Backups/` - Backup copies of configuration files (created during setup) | ||
|
|
||
| ## Microsoft Store Quick Start | ||
|
|
||
| 1. Open PowerShell and navigate to the Publication folder: | ||
|
|
||
| ```powershell | ||
| cd <YourProject>\Publication | ||
| ``` | ||
|
|
||
| 2. Run the one-time setup script: | ||
|
|
||
| ```powershell | ||
| .\one-time-store-publishing-setup.ps1 | ||
| ``` | ||
|
|
||
| 3. Follow the prompts to enter your Microsoft Store information from Partner Center: | ||
| - Package Identity Name | ||
| - Publisher Certificate | ||
| - Display Name | ||
| - Publisher Display Name | ||
|
|
||
| The script will update your `Package.appxmanifest` with Store-specific values. | ||
|
|
||
| 4. Once configured, build your bundle: | ||
|
|
||
| ```powershell | ||
| .\build-msix-bundles.ps1 | ||
| ``` | ||
|
|
||
| This script will: | ||
| - Build x64 and ARM64 MSIX packages | ||
| - Automatically update `microsoft-store-resources\bundle_mapping.txt` with correct paths | ||
| - Create a combined MSIX bundle | ||
| - Display the bundle location when complete | ||
|
|
||
| 5. Upload the resulting `.msixbundle` file from `microsoft-store-resources\` to Partner Center | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### makeappx.exe not found | ||
|
|
||
| The build script requires the Windows SDK. Install it via: | ||
|
|
||
| - Visual Studio Installer (Individual Components → Windows SDK) | ||
| - [Standalone Windows SDK](https://developer.microsoft.com/windows/downloads/windows-sdk/) | ||
|
|
||
| ### Build errors | ||
|
|
||
| Ensure you have: | ||
|
|
||
| - .NET 9.0 SDK installed | ||
| - Windows SDK 10.0.26100.0 or compatible version | ||
| - No other instances of Visual Studio building the project | ||
|
|
||
| ### Bundle creation fails | ||
|
|
||
| Check that: | ||
|
|
||
| - Both x64 and ARM64 builds completed successfully | ||
| - `microsoft-store-resources\bundle_mapping.txt` paths are correct (auto-updated by script) | ||
| - No file locks on the MSIX files | ||
|
|
||
| ## WinGet Quick Start | ||
|
|
||
| 1. Open PowerShell and navigate to the Publication folder: | ||
|
|
||
| ```powershell | ||
| cd <YourProject>\Publication | ||
| ``` | ||
|
|
||
| 2. Run the one-time setup script: | ||
|
|
||
| ```powershell | ||
| .\one-time-winget-publishing-setup.ps1 | ||
| ``` | ||
|
|
||
| 3. Follow the prompts to enter: | ||
| - GitHub Repository URL (where releases will be published) | ||
| - Developer/Publisher Name | ||
|
|
||
| The script will: | ||
| - Configure `winget-resources\build-exe.ps1` with your extension details | ||
| - Configure `winget-resources\setup-template.iss` with your extension information | ||
| - Move `release-extension.yml` to `.github\workflows\` in your repository root | ||
|
|
||
| 4. Commit and push changes to GitHub: | ||
|
|
||
| ```powershell | ||
| git add . | ||
| git commit -m "Configure extension for WinGet publishing" | ||
| git push | ||
| ``` | ||
|
|
||
| 5. Trigger the GitHub Action to build and release: | ||
|
|
||
| ```powershell | ||
| gh workflow run release-extension.yml --ref main -f "release_notes=**First Release of <ExtensionName> Extension for Command Palette** | ||
|
|
||
| The inaugural release of the <ExtensionName> for Command Palette..." | ||
| ``` | ||
|
|
||
| Or create a release manually through the GitHub web interface. | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| - [Command Palette Extension Publishing Documentation](https://learn.microsoft.com/en-us/windows/powertoys/command-palette/publish-extension) | ||
| - [Microsoft Store Publishing Guide](https://learn.microsoft.com/windows/apps/publish/) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.