mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
trying to deconstruct a script
This commit is contained in:
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
@@ -94,7 +94,7 @@ jobs:
|
|||||||
run: npm run package:lin
|
run: npm run package:lin
|
||||||
|
|
||||||
- name: Package Chocolatey
|
- name: Package Chocolatey
|
||||||
run: .\scripts\choco-pack.ps1
|
run: .\scripts\choco-pack.ps1 # DO NOT USE PUSH SWITCH!
|
||||||
|
|
||||||
- name: Zip
|
- name: Zip
|
||||||
shell: cmd
|
shell: cmd
|
||||||
@@ -171,19 +171,39 @@ jobs:
|
|||||||
name: Publish Windows
|
name: Publish Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: build
|
needs: build
|
||||||
if: github.event_name == 'release'
|
#if: github.event_name == 'release'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Chocolatey
|
#- name: Setup Chocolatey
|
||||||
run: choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
|
# run: choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
|
||||||
env:
|
# env:
|
||||||
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
|
# CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
|
||||||
|
|
||||||
|
#- name: Publish
|
||||||
|
# run: |
|
||||||
|
# .\scripts\choco-update.ps1 -version $env:PACKAGE_VERSION
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
.\scripts\choco-update.ps1 -version $env:PACKAGE_VERSION
|
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
$rootDir = $dir
|
||||||
|
$distDir = $rootDir + "\dist"
|
||||||
|
$distChocoDir = $distDir + "\chocolatey"
|
||||||
|
|
||||||
|
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
|
||||||
|
#choco push
|
||||||
|
Write-Host "[+] Intead of pushing with choco, we are testing and writing this out"
|
||||||
|
Write-Host " Nuget Packge: $env:distChocoDir\\$env:nupkg"
|
||||||
|
|
||||||
|
|
||||||
# This process seems independent from the others
|
# This process seems independent from the others
|
||||||
|
|||||||
Reference in New Issue
Block a user