ci: use env to pass PAT
This commit is contained in:
parent
c7134c2f68
commit
bdd6bb47c2
1 changed files with 3 additions and 2 deletions
5
.github/workflows/winget-submission.yml
vendored
5
.github/workflows/winget-submission.yml
vendored
|
@ -9,12 +9,13 @@ jobs:
|
||||||
winget:
|
winget:
|
||||||
name: Publish winget package
|
name: Publish winget package
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
WINGET_PAT: ${{ secrets.WINGET_PAT }}
|
||||||
steps:
|
steps:
|
||||||
- name: Submit package to Winget Community Repo
|
- name: Submit package to Winget Community Repo
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
$packageId = "Vencord.Vesktop"
|
$packageId = "Vencord.Vesktop"
|
||||||
$gitToken = "${{ secrets.WINGET_PAT }}"
|
|
||||||
|
|
||||||
# Fetching latest release from GitHub
|
# Fetching latest release from GitHub
|
||||||
$github = Invoke-RestMethod -uri "https://api.github.com/repos/vencord/vesktop/releases"
|
$github = Invoke-RestMethod -uri "https://api.github.com/repos/vencord/vesktop/releases"
|
||||||
|
@ -24,4 +25,4 @@ jobs:
|
||||||
|
|
||||||
# Update package using wingetcreate
|
# Update package using wingetcreate
|
||||||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
||||||
.\wingetcreate.exe update $packageId --version $packageVersion --urls "$installerUrl" --submit --token $gitToken
|
.\wingetcreate.exe update $packageId --version $packageVersion --urls "$installerUrl" --submit --token $env:WINGET_PAT
|
||||||
|
|
Reference in a new issue