ci: switch to vedantmgoyal2009/winget-releaser (#103)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
d5f63da939
commit
ef064eba3d
1 changed files with 6 additions and 22 deletions
28
.github/workflows/winget-submission.yml
vendored
28
.github/workflows/winget-submission.yml
vendored
|
@ -1,33 +1,17 @@
|
||||||
# Based on Microsoft/DevHome Winget CI, modified for use in Vencord/Vesktop.
|
|
||||||
#
|
|
||||||
# Copyright (c) Microsoft Corporation and Contributors
|
|
||||||
# Licensed under the MIT license.
|
|
||||||
|
|
||||||
name: Submit to Winget Community Repo
|
name: Submit to Winget Community Repo
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
winget:
|
winget:
|
||||||
name: Publish winget package
|
name: Publish winget package
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
WINGET_PAT: ${{ secrets.WINGET_PAT }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Submit package to Winget Community Repo
|
- name: Submit package to Winget Community Repo
|
||||||
run: |
|
uses: vedantmgoyal2009/winget-releaser@52ef3f3028ed79a9606d7678d0a88d295bc0c690 # v2
|
||||||
|
with:
|
||||||
$packageId = "Vencord.Vesktop"
|
identifier: Vencord.Vesktop
|
||||||
|
token: ${{ secrets.WINGET_PAT }}
|
||||||
# Fetching latest release from GitHub
|
installers-regex: '\.exe$'
|
||||||
$github = Invoke-RestMethod -uri "https://api.github.com/repos/vencord/vesktop/releases"
|
|
||||||
$targetRelease = $github | Select-Object -First 1
|
|
||||||
$installerUrl = $targetRelease | Select-Object -ExpandProperty assets -First 1 | Where-Object -Property name -match 'Vesktop-Setup.*?exe' | Select-Object -ExpandProperty browser_download_url
|
|
||||||
$packageVersion = $targetRelease.tag_name.Trim("v")
|
|
||||||
|
|
||||||
# Update package using wingetcreate
|
|
||||||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
|
||||||
.\wingetcreate.exe update $packageId --version $packageVersion --urls "$installerUrl" --submit --token $env:WINGET_PAT
|
|
||||||
|
|
Loading…
Reference in a new issue