jeffvli / feishin

A modern self-hosted music player.
https://feishin.vercel.app
GNU General Public License v3.0
2.83k stars 116 forks source link

Github Action to update winget package on release for `jeffvli.Feishin` #749

Open jo-chemla opened 2 months ago

jo-chemla commented 2 months ago

What do you want to be added?

There is an existing winget package for Feishin wirth identifier jeffvli.Feishin, for which updates are usually pushed manually by github user @SpecterShell Enable the easy winget install feishin or winget install jeffvli.Feishin command.

It could be useful to add a Github Action workflow on this repo so that the winget package gets updated on every github release. Having a github action do it on every release would make sure the winget-pkgs repo always has the latest version available. Just for context, I did the same request for winget-release github action workflow for BlenderLauncher, Triplex, f3d & others.

Additional context

Here are two reference articles + action yml files made to keep the winget package up-to-date on every github release, via Github Actions. Requires a winget-token to be stored in security of the repo.

name: Publish to WinGet
on:
  release:
    types: [ released ]
jobs:
  publish:
    runs-on: windows-latest
    steps:
      - uses: vedantmgoyal9/winget-releaser@main
        with:
          identifier: Package.Identifier
          token: ${{ secrets.WINGET_TOKEN }}
          # installers-regex: '\.exe$' # Only .exe files
name: Submit Nushell package to Windows Package Manager Community Repository 

on:
  release:
    types: [published]

jobs:

  winget:
    name: Publish winget package
    runs-on: windows-latest
    steps:
      - name: Submit package to Windows Package Manager Community Repository
        run: |
          iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
          $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
          $installerUrl = $github.release.assets | Where-Object -Property name -match 'windows.msi' | Select -ExpandProperty browser_download_url -First 1
          .\wingetcreate.exe update Nushell.Nushell -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.NUSHELL_PAT }}

Is this a server-specific feature? (e.g. Jellyfin only)