From 90f9095215fea9f62bd359fc12894ecee3e0228b Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 8 Jan 2021 20:29:28 +0000 Subject: [PATCH] trying a download action --- .github/workflows/build.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41e4bfc20c..059de1063e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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"