Skip to content
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

Feature: Add github action workflow to update winget-pkg files on every release #16374

Open
jo-chemla opened this issue Oct 21, 2024 · 5 comments

Comments

@jo-chemla
Copy link

What feature or improvement do you think would benefit Files?

At the moment, the FilesCommunity.Files package has been removed from microsoft/winget-pkgs. Looks like the latest available version was 3.6.0.0 on the linked PR. Is this because of a bug during validation of the package as seem to be mentioned in the PR listed, or becasue there is not Github Action pushing new releases to the repo?
Two linked closed issues here:

Requirements

Have the FilesCommunity.Files available so user can install Files via winget install files or winget install FilesCommunity.Files

Files Version

3.6.0.0

Windows Version

10 + 11

Comments

No response

@Josh65-2201
Copy link
Member

Thanks for the feedback, The package would have to be added by the Winget team. The one working on it before stop and the PR was closed for inactivity microsoft/winget-pkgs#150504 (comment), last issue they had with validation was on there side too. A GitHub action isn't needed to add programs.

@Josh65-2201
Copy link
Member

I have made a new PR in hopes that it get added microsoft/winget-pkgs#184766

@jo-chemla
Copy link
Author

Thanks for doing the new PR, hope it gets merged by winget team!

Yes anyone can indeed submit PRs to have packages added - as long as they follow their recommendations and the submitted manifests pass testing. The github action is a nice way to avoid having a middleman required to push new package releases to winget-pkgs.

There are a minimal set of requirements for the automated way to work smoothly which are:

  • there has to be at least one version of the package with the given identifier - eg FilesCommunity.Files - before the winget-releaser action can push new releases.
  • the user doing the pushes (can belong to the repository) has to have a fork of 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.
  • a github classic Personal Access Token (PAT) with public_repo scope has to be created and this token should be added as a repository secret by creating a new repo secret with name WINGET_ACC_TOKEN and value the token

@Josh65-2201
Copy link
Member

A bot to update the manifests would be discussed if Files can get on WinGet, right now the VCLib dependency is outdated on WinGet and is blocking Files from being added.

@jo-chemla
Copy link
Author

Glad to see that Files 3.7.11.0 has finally made it to the winget package repository! Also saw you used wingetcreate to push FilesPreview microsoft/winget-pkgs#191569

To automate the release on every github release of Files, if the builds were pushed to this repo releases, then the Github Action workflow file could look like the following. Note at the moment, the build files are stored at a cdn https://cdn.files.community/files/preview/Files.Package_3.7.12.0_Preview_Test/Files.Package_3.7.12.0_x64_arm64_Preview.msixbundle.

But first the build or CI action would have to push the msixbundle files to github releases.

name: Publish to WinGet
on:
  release:
    types: [ released ]
jobs:
  publish:
    runs-on: windows-latest
    steps:
      - uses: vedantmgoyal9/winget-releaser@v2
        with:
          identifier: FilesCommunity.Files
          token: ${{ secrets.WINGET_TOKEN }}
          installers-regex: 'Files\.Package\_\w*\_x64\w*.msixbundle$' 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants