mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 04:25:45 +00:00
Automated security fixes applied by Runner Guard (https://github.com/Vigilant-LLC/runner-guard). Changes: .github/workflows/build-all.yml | 30 ++++++++++++++++++++--------- .github/workflows/build-linux.yml | 6 +++--- .github/workflows/build-osx.yml | 10 ++++++---- .github/workflows/build-windows-desktop.yml | 2 +- .github/workflows/build-windows.yml | 2 +- .github/workflows/winget-publish.yml | 5 ++++- 6 files changed, 36 insertions(+), 19 deletions(-)
42 lines
No EOL
1.8 KiB
YAML
42 lines
No EOL
1.8 KiB
YAML
name: WinGet submission on release
|
|
# based off of https://github.com/nushell/nushell/blob/main/.github/workflows/winget-submission.yml
|
|
# inspired by https://github.com/microsoft/PowerToys/blob/main/.github/workflows/package-submissions.yml
|
|
# Modified by @MerrickZ https://github.com/anpho
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [released]
|
|
|
|
jobs:
|
|
winget:
|
|
name: Publish winget package
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Submit v2ray package to Windows Package Manager Community Repository
|
|
run: |
|
|
|
|
$wingetPackage = "2dust.v2rayN"
|
|
$gitToken = "${PT_WINGET}"
|
|
|
|
$github = Invoke-RestMethod -uri "https://api.github.com/repos/2dust/v2rayN/releases"
|
|
|
|
$targetRelease = $github | Where-Object -Property prerelease -match 'False' | Select -First 1
|
|
|
|
$x64InstallerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-64\.zip' | Select -ExpandProperty browser_download_url
|
|
$arm64InstallerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-arm64\.zip' | Select -ExpandProperty browser_download_url
|
|
|
|
$ver = $targetRelease.tag_name
|
|
|
|
# getting latest wingetcreate file
|
|
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
|
|
|
Write-Host "Updating with both x64 and arm64 installers"
|
|
Write-Host "Version: $ver"
|
|
Write-Host "x64 URL: $x64InstallerUrl"
|
|
Write-Host "arm64 URL: $arm64InstallerUrl"
|
|
|
|
.\wingetcreate.exe update $wingetPackage -s -v $ver -u "$x64InstallerUrl|x64" "$arm64InstallerUrl|arm64" -t $gitToken
|
|
|
|
env:
|
|
PT_WINGET: ${{ secrets.PT_WINGET }} |