trying a download action

This commit is contained in:
Joseph Flinn 2021-01-08 20:29:28 +00:00
parent bc88785eb8
commit 90f9095215
1 changed files with 10 additions and 6 deletions

View File

@ -176,6 +176,12 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
- name: Download Windows Nuget
uses: actions/download-artifact@v2
with:
name: bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
path: ./dist/bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
#- name: Setup Chocolatey
# run: choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
# env:
@ -191,16 +197,14 @@ jobs:
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
$rootDir = $dir
$distDir = $rootDir + "\dist"
$distChocoDir = $distDir + "\chocolatey"
$distChocoDir = $distDir
New-Item -ItemType directory -Path $distChocoDir | Out-Null
#New-Item -ItemType directory -Path $distChocoDir | Out-Null
$nupkg = "bitwarden-cli." + $version + ".nupkg"
$uri = "https://github.com/bitwarden/cli/releases/download/v" + $version + "/" + $nupkg
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri $uri -OutFile $($distChocoDir + "\\" + $nupkg)
cd $distChocoDir
cd ./dist
Get-ChildItem
#choco push
Write-Host "[+] Intead of pushing with choco, we are testing and writing this out"
Write-Host " Nuget Packge: $env:distChocoDir\\$env:nupkg"