Dmitry Nefedov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
20 additions and
1 deletions
-
.github/workflows/Badge.yml
|
|
@ -20,7 +20,26 @@ jobs: |
|
|
|
|
|
|
|
- name: Download cloc |
|
|
|
run: | |
|
|
|
. Scripts\cloc.ps1 |
|
|
|
$Token = "${{ secrets.GITHUB_TOKEN }}" |
|
|
|
$Headers = @{ |
|
|
|
Accept = "application/json" |
|
|
|
Authorization = "Bearer $Token" |
|
|
|
} |
|
|
|
$Parameters = @{ |
|
|
|
Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest" |
|
|
|
Headers = $Headers |
|
|
|
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" |
|
|
|
UseBasicParsing = $true |
|
|
|
Verbose = $true |
|
|
|
} |
|
|
|
Invoke-WebRequest @Parameters |
|
|
|
|
|
|
|
- name: Get the Numbers |
|
|
|
run: | |
|
|
|