Add Winget Releaser workflow (#2036)

* Add Winget Releaser workflow

* Add dependabot

* Use commit hashes for versioning

* Update hash
This commit is contained in:
sitiom 2023-04-13 05:05:48 +08:00 committed by GitHub
parent c8e86fb9eb
commit fa80857593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

6
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

20
.github/workflows/winget.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Publish to WinGet
on:
release:
types: [released]
jobs:
publish:
runs-on: windows-latest # Action can only be run on windows
steps:
- name: Extract version from tag
id: extract_version
run: |
$version = [regex]::Match("${{ github.event.release.tag_name }}", "(?<=v)[\d.]+").Value
Write-Output "version=$version" >> $env:GITHUB_OUTPUT
- uses: vedantmgoyal2009/winget-releaser@c9092bc79d77d72dd54e036af65bcc8814a7e599
with:
identifier: Microsoft.OpenSSH.Beta
version: ${{ steps.extract_version.outputs.version }}
token: ${{ secrets.WINGET_TOKEN }}