jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.9k stars 1.85k forks source link

Automate Winget releases #2553

Open Araxeus opened 1 year ago

Araxeus commented 1 year ago

There's this awesome semi-official action – https://github.com/vedantmgoyal2009/winget-releaser

Used by many, including for example nushell , pnpm, vscodium, neovim, jacket, and many more

It is easy to set up and will automatically update https://github.com/KaranKad/winget-pkgs/tree/master/manifests/j/JesseDuffield/lazygit

Here's an example action.yml you could use:

name: Submit to Windows Package Manager Community Repository

on:
  release:
    types: [released]
  workflow_dispatch:
    inputs:
      tag_name:
        description: "Specific tag name"
        required: true
        type: string

jobs:
  winget:
    name: Publish winget package
    runs-on: windows-latest
    steps:
      - name: Submit package to Windows Package Manager Community Repository
        uses: vedantmgoyal2009/winget-releaser@v2
        with:
          identifier: JesseDuffield.lazygit
          installers-regex: '_Windows_x86_64.zip$'
          version: ${{ inputs.tag_name || github.event.release.tag_name }}
          release-tag: ${{ inputs.tag_name || github.event.release.tag_name }}
          token: ${{ secrets.WINGET_ACC_TOKEN }}
          fork-user: lazygit-winget-bot

Note You will need to create a bot, explained in the action repo

Araxeus commented 1 year ago

Will fix #1466

mloskot commented 1 year ago

I guess something will have to submit PR with this, but it would be helpful to get confirmation if this has chance to be accepted.