mirror of
https://github.com/bs-community/blessing-skin-plugins.git
synced 2025-01-09 04:07:51 +08:00
8 lines
437 B
PowerShell
8 lines
437 B
PowerShell
$token = 'Bearer ' + $env:GITHUB_TOKEN
|
|
$headers = @{"authorization"=$token}
|
|
$nanoRelease = (Invoke-WebRequest 'https://api.github.com/repos/bs-community/nano/releases/latest' -Headers $headers).Content | ConvertFrom-Json
|
|
$nanoBinUrl = ((Invoke-WebRequest $nanoRelease.assets_url -Headers $headers).Content | ConvertFrom-Json).browser_download_url
|
|
|
|
bash -c "curl -fSL $nanoBinUrl --header 'authorization: $token' -o nano"
|
|
chmod +x ./nano
|