Skip to content

Commit

Permalink
GitHub action to integrate with winget-releaser upon release
Browse files Browse the repository at this point in the history
- This uses https://github.com/marketplace/actions/winget-releaser with
  Komac under the hood to initiate a pull request to microsoft/winget-pkgs
  whenever a release is created
- Tags are expected to carry on the existing scheme of giving the _bare_
  segmented version number ... if this changes, the action needs to be
  adjusted
- This action has further **prerequisites**:
  * someone associated with the Conan project should create a (classic)
    personal access token (https://github.com/settings/tokens) with
    scope `public_repo` (no other scopes should be active)
  * the main conan-io/project should get a secret
    (https://github.com/conan-io/conan/settings/secrets/actions)
    configured with the name `WINGET_TOKEN`
  * furthermore someone associated with the Conan project should fork
    microsoft/winget-pkgs
    * if it gets forked to their personal user account `fork-user` needs
      to be configured accordingly
    * it's implied that full access is possible for said user to said
      fork; PRs initiated via this action will be issued _from_ this
      fork of winget-pkgs
    * the maintainer of winget-releaser suggests strongly to keep the
      fork up-to-date via the Pull app (https://github.com/wei/pull) as
      well -- I reckon the main purpose is to provide clean pull
      requests with the least amount of friction or risk of conflict
  * after that everything should be in place to upgrade the existing
    winget-pkgs manifest
    * NB: if desired `max-versions-to-keep` can be configured to limit
      the number of older version manifests available (e.g. if the old
      version downloads are known to disappear at a certain cadence)
      * please note that when initially configuring this, it will likely
        (haven't tried it) result in _one PR per culled old version_,
        since winget-pkgs has the rule of modifying only a single
        manifest per PR! This is one of the reasons I opted to stick
        with the minimal configuration for this action.
  • Loading branch information
assarbad committed Oct 11, 2024
1 parent 890f000 commit 8182afd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/publish-to-winget-pkgs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Publish release tags to WinGet
on:
release:
types: [released]
jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: JFrog.Conan
installers-regex: 'conan-.+?-installer\.exe$' # Only the .exe installers
token: ${{ secrets.WINGET_TOKEN }}

0 comments on commit 8182afd

Please sign in to comment.