Auto Push Winget releases via github action workflow

#135 · open · 1 comments

View on GitHub ↗

jo-chemla

A few months back, I made a [PR](https://github.com/microsoft/winget-pkgs/pull/207985) to microsoft/winget-pkgs repo so simple-http-server can be installed by your user-base from windows package manager, winget, via a simple command: `winget install TheWaWaR.simple-http-server` It could be useful to add a github action on this repo so that the winget package gets updated on every github release. ### Describe the solution you'd like to see. Here is a reference article based on [Winget-Releaser@v2 Github Action](https://github.com/russellbanks/Komac?tab=readme-ov-file#usage-with-github-actions-winget-releaser-) Below is an action yml files made to keep the winget package up-to-date on every github release, via Github Actions. Requires: - You will need to create a classic Personal Access Token (PAT) with public_repo scope. - This token should be added as a repository secret by creating a [new repo secret](https://github.com/Jacalz/rymdport/settings/secrets/actions/new) with name `WINGET_ACC_TOKEN` and value the token - Fork [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs) under the same account/organization as the project's repository. If you are forking winget-pkgs on a different account (e.g. bot/personal account), you can use the fork-user input to specify the username of the account where the fork is present. ```yaml name: Publish to WinGet on: release: types: [ released ] jobs: publish: runs-on: windows-latest steps: - uses: vedantmgoyal9/winget-releaser@v2 with: identifier: TheWaWaR.simple-http-server token: ${{ secrets.WINGET_TOKEN }} installers-regex: 'windows*\.exe$' ```

Comments

jo-chemla

Hi @TheWaWaR are you interested in a mini PR for this automated winget-release workflow? Or should I close this thread? Thanks!