mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Add a Winget Releaser workflow (#14965)
[The winget-releaser action] automatically generates manifests for the [Winget Community Repository] and submits them. I suggest adding Dependabot to keep the action up to date. There were many cases where the action was failing due to an outdated version. Closes #14795 [The winget-releaser action]: https://github.com/vedantmgoyal2009/winget-releaser [Winget Community Repository]: https://github.com/microsoft/winget-pkgs
This commit is contained in:
parent
b6bb3e0a80
commit
bee22f3ec8
27
.github/workflows/winget.yml
vendored
Normal file
27
.github/workflows/winget.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: Publish to Winget
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
REGEX: 'Microsoft\.WindowsTerminal(?:Preview)?_Win10_([\d.]+)_8wekyb3d8bbwe\.msixbundle$'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest # Action can only run on Windows
|
||||
steps:
|
||||
- name: Extract version from release asset
|
||||
id: extract-version
|
||||
run: |
|
||||
$version = '${{ toJSON(github.event.release.assets.*.name) }}' | ConvertFrom-Json | Select-String -Pattern $env:REGEX | ForEach-Object { $_.Matches.Groups[1].Value }
|
||||
Write-Output "version=$version" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Publish ${{ github.event.release.prerelease && 'Preview' || 'Stable' }}
|
||||
uses: vedantmgoyal2009/winget-releaser@v2
|
||||
with:
|
||||
identifier: Microsoft.WindowsTerminal${{ github.event.release.prerelease && '.Preview' || '' }}
|
||||
version: ${{ steps.extract-version.outputs.version }}
|
||||
installers-regex: ${{ env.REGEX }}
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
fork-user: DHowett
|
||||
Loading…
x
Reference in New Issue
Block a user