mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-20 02:01:47 +01:00
BRE-272 - Fix CLI release and publish workflows (#10688)
This commit is contained in:
parent
887d1924a3
commit
62666c51f5
19
.github/workflows/publish-cli.yml
vendored
19
.github/workflows/publish-cli.yml
vendored
@ -35,6 +35,10 @@ on:
|
|||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: apps/cli
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
name: Setup
|
name: Setup
|
||||||
@ -42,6 +46,9 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
release-version: ${{ steps.version-output.outputs.version }}
|
release-version: ${{ steps.version-output.outputs.version }}
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: .
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
if: ${{ inputs.publish_type != 'Dry Run' }}
|
if: ${{ inputs.publish_type != 'Dry Run' }}
|
||||||
@ -83,9 +90,6 @@ jobs:
|
|||||||
if: inputs.snap_publish
|
if: inputs.snap_publish
|
||||||
env:
|
env:
|
||||||
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: apps/cli
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
@ -106,7 +110,7 @@ jobs:
|
|||||||
uses: samuelmeuli/action-snapcraft@d33c176a9b784876d966f80fb1b461808edc0641 # v2.1.1
|
uses: samuelmeuli/action-snapcraft@d33c176a9b784876d966f80fb1b461808edc0641 # v2.1.1
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
run: wget https://github.com/bitwarden/clients/releases/cli-v${{ env._PKG_VERSION }}/download/bw_${{ env._PKG_VERSION }}_amd64.snap
|
run: wget https://github.com/bitwarden/clients/releases/download/cli-v${{ env._PKG_VERSION }}/bw_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
|
|
||||||
- name: Publish Snap & logout
|
- name: Publish Snap & logout
|
||||||
if: ${{ inputs.publish_type != 'Dry Run' }}
|
if: ${{ inputs.publish_type != 'Dry Run' }}
|
||||||
@ -145,15 +149,14 @@ jobs:
|
|||||||
CHOCO_API_KEY: ${{ steps.retrieve-secrets.outputs.cli-choco-api-key }}
|
CHOCO_API_KEY: ${{ steps.retrieve-secrets.outputs.cli-choco-api-key }}
|
||||||
|
|
||||||
- name: Make dist dir
|
- name: Make dist dir
|
||||||
shell: pwsh
|
|
||||||
run: New-Item -ItemType directory -Path ./dist
|
run: New-Item -ItemType directory -Path ./dist
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
run: wget https://github.com/bitwarden/clients/releases/cli-v${{ env._PKG_VERSION }}/download/bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
shell: bash
|
||||||
|
run: wget https://github.com/bitwarden/clients/releases/download/cli-v${{ env._PKG_VERSION }}/bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
||||||
|
|
||||||
- name: Push to Chocolatey
|
- name: Push to Chocolatey
|
||||||
if: ${{ inputs.publish_type != 'Dry Run' }}
|
if: ${{ inputs.publish_type != 'Dry Run' }}
|
||||||
shell: pwsh
|
|
||||||
run: |
|
run: |
|
||||||
cd dist
|
cd dist
|
||||||
choco push --source=https://push.chocolatey.org/
|
choco push --source=https://push.chocolatey.org/
|
||||||
@ -182,7 +185,7 @@ jobs:
|
|||||||
secrets: "npm-api-key"
|
secrets: "npm-api-key"
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
run: wget https://github.com/bitwarden/clients/releases/cli-v${{ env._PKG_VERSION }}/download/bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
run: wget https://github.com/bitwarden/clients/releases/download/cli-v${{ env._PKG_VERSION }}/bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
||||||
|
|
||||||
- name: Setup NPM
|
- name: Setup NPM
|
||||||
run: |
|
run: |
|
||||||
|
4
.github/workflows/publish-web.yml
vendored
4
.github/workflows/publish-web.yml
vendored
@ -8,10 +8,10 @@ on:
|
|||||||
publish_type:
|
publish_type:
|
||||||
description: 'Publish Options'
|
description: 'Publish Options'
|
||||||
required: true
|
required: true
|
||||||
default: 'Initial Publish'
|
default: 'Initial Release'
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- Initial Publish
|
- Initial Release
|
||||||
- Redeploy
|
- Redeploy
|
||||||
- Dry Run
|
- Dry Run
|
||||||
|
|
||||||
|
3
.github/workflows/release-cli.yml
vendored
3
.github/workflows/release-cli.yml
vendored
@ -92,7 +92,8 @@ jobs:
|
|||||||
apps/cli/bw-linux-sha256-${{ env.PKG_VERSION }}.txt,
|
apps/cli/bw-linux-sha256-${{ env.PKG_VERSION }}.txt,
|
||||||
apps/cli/bitwarden-cli.${{ env.PKG_VERSION }}.nupkg,
|
apps/cli/bitwarden-cli.${{ env.PKG_VERSION }}.nupkg,
|
||||||
apps/cli/bw_${{ env.PKG_VERSION }}_amd64.snap,
|
apps/cli/bw_${{ env.PKG_VERSION }}_amd64.snap,
|
||||||
apps/cli/bw-snap-sha256-${{ env.PKG_VERSION }}.txt"
|
apps/cli/bw-snap-sha256-${{ env.PKG_VERSION }}.txt,
|
||||||
|
apps/cli/bitwarden-cli-${{ env.PKG_VERSION }}-npm-build.zip"
|
||||||
commit: ${{ github.sha }}
|
commit: ${{ github.sha }}
|
||||||
tag: cli-v${{ env.PKG_VERSION }}
|
tag: cli-v${{ env.PKG_VERSION }}
|
||||||
name: CLI v${{ env.PKG_VERSION }}
|
name: CLI v${{ env.PKG_VERSION }}
|
||||||
|
Loading…
Reference in New Issue
Block a user