From a1a71a4313e4779798f64e8afecbc24d2d6b67ff Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 8 Jan 2023 18:06:14 +0300 Subject: [PATCH] Update cloc.ps1 --- Scripts/cloc.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Scripts/cloc.ps1 b/Scripts/cloc.ps1 index 62309426..f22e7a88 100644 --- a/Scripts/cloc.ps1 +++ b/Scripts/cloc.ps1 @@ -1,12 +1,16 @@ # Download cloc # https://github.com/AlDanial/cloc +$Token = ConvertTo-SecureString '${{ secrets.GITHUB_TOKEN }}' -AsPlainText $Parameters = @{ - Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest" + Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest" + Token = $Token + Authentication = "Bearer" UseBasicParsing = $true Verbose = $true } $Tag = (Invoke-RestMethod @Parameters).tag_name.replace("v", "") + $Parameters = @{ Uri = "https://github.com/AlDanial/cloc/releases/download/v$Tag/cloc-$Tag.exe" OutFile = "$PSScriptRoot\cloc.exe"