Publish new releases of your application to the Windows Package Manager easily.
Creating manifests and pull requests for every release of your application can be time-consuming and error-prone.
WinGet Releaser allows you to automate this process, with pull requests that are trusted amongst the community, often expediting the amount of time it takes for a submission to be reviewed.
- You will need to create a Personal Access Token (PAT) with
public_repo
scope.
- Fork the winget-pkgs repository under the same account/organization as your repository on which you want to use this action. Ensure that the fork is up-to-date with the upstream repository. You can do this using one of the following methods:
- Give
workflow
permission to the token you created in Step 1. This will allow the action to automatically update your fork with the upstream repository. - You can use Pull App which keeps your fork up-to-date with the upstream repository via automated pull requests.
Workflow with the minimal configuration | Workflow with a filter to only publish .exe files |
---|---|
name: Publish to WinGet
on:
release:
types: [released]
jobs:
publish:
# Action can only be run on windows
runs-on: windows-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: Package.Identifier
token: ${{ secrets.WINGET_TOKEN }} |
name: Publish to WinGet
on:
release:
types: [released]
jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: Package.Identifier
installers-regex: '\.exe$' # Only .exe files
token: ${{ secrets.WINGET_TOKEN }} |
Workflow to publish multiple packages | Workflow with implementation of custom package version |
name: Publish to WinGet
on:
release:
types: [released]
jobs:
publish:
runs-on: windows-latest
steps:
- name: Publish X to WinGet
uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: Package.Identifier<X>
installers-regex: '\.exe$' # Only .exe files
token: ${{ secrets.WINGET_TOKEN }}
- name: Publish Y to WinGet
uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: Package.Identifier<Y>
installers-regex: '\.msi$' # Only .msi files
token: ${{ secrets.WINGET_TOKEN }} |
name: Publish to WinGet
on:
release:
types: [released]
jobs:
publish:
runs-on: windows-latest
steps:
- name: Get version
id: get-version
run: |
# Finding the version from release name
$VERSION="${{ github.event.release.name }}" -replace '^.*/ '
echo "::set-output name=version::$VERSION"
shell: pwsh
- uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: Package.Identifier
version: ${{ steps.get-version.outputs.version }}
token: ${{ secrets.WINGET_TOKEN }} |
- Required: ✅
The package identifier of the package to be updated in the Windows Package Manager Community Repository.
identifier: Publisher.Package # Microsoft.Excel
- Required: ❌ (defaults to tag, excluding
v
prefix:v1.0.0
->1.0.0
)
The PackageVersion
of the package you want to release.
version: ${{ github.event.release.tag_name }} # For tags without the 'v' prefix
- Required: ❌ (Default value:
.(exe|msi|msix|appx)(bundle){0,1}$
)
A regular expression to match the installers from the release artifacts which are to be published to Windows Package Manager (WinGet).
installers-regex: '\.exe$'
# Some common regular expressions include:
## '\.msi$' -> All MSI's
## '\.exe$' -> All EXE's
## '\.(exe|msi)' -> All EXE's and MSI's
## '\.zip$' -> All ZIP's
- Required: ❌ (Default value:
'false'
)
Set this to true if you want to overwrite the previous version of the package with the latest version.
delete-previous-version: 'true' # don't forget to quotes
- Required: ❌ (Default value:
${{ github.event.release.tag_name || github.ref }}
)
The GitHub release tag of the release you want to publish to Windows Package Manager (WinGet).
release-tag: ${{ github.event.inputs.version }} # workflow_dispatch input `version`
- Required: ✅
The GitHub token with which the action will authenticate with GitHub API and create a pull request on the microsoft/winget-pkgs repository.
token: ${{ secrets.WINGET_TOKEN }} # Repository secret called 'WINGET_TOKEN'
Note Do not directly put the token in the action. Instead, create a repository secret containing the token and use that in the workflow. See using encrypted secrets in a workflow for more details.
- Required: ❌ (Default value:
${{ github.repository_owner }} # repository owner
)
This is the GitHub username of the user where the fork of microsoft/winget-pkgs is present. This fork will be used to create the pull request.
fork-user: dotnet-winget-bot # for example purposes only
Thanks goes to these wonderful people (emoji key):
Baptiste Augrain 💻 🤔 |
Kei Touge 🐛 |
Maxim 🐛 |
Russell Banks 🤔 📖 |
Tim Brinkley 🐛 💵 |
Vedant 💻 |
sitiom 📖 🐛 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!