mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
BRE-272 - Fix Publish Workflows (#10693)
This commit is contained in:
9
.github/workflows/publish-cli.yml
vendored
9
.github/workflows/publish-cli.yml
vendored
@@ -152,14 +152,13 @@ jobs:
|
|||||||
run: New-Item -ItemType directory -Path ./dist
|
run: New-Item -ItemType directory -Path ./dist
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
shell: bash
|
run: Invoke-WebRequest -Uri "https://github.com/bitwarden/clients/releases/download/cli-v${{ env._PKG_VERSION }}/bitwarden-cli.${{ env._PKG_VERSION }}.nupkg" -OutFile bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
||||||
run: wget https://github.com/bitwarden/clients/releases/download/cli-v${{ env._PKG_VERSION }}/bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
working-directory: apps/cli/dist
|
||||||
|
|
||||||
- name: Push to Chocolatey
|
- name: Push to Chocolatey
|
||||||
if: ${{ inputs.publish_type != 'Dry Run' }}
|
if: ${{ inputs.publish_type != 'Dry Run' }}
|
||||||
run: |
|
run: choco push --source=https://push.chocolatey.org/
|
||||||
cd dist
|
working-directory: apps/cli/dist
|
||||||
choco push --source=https://push.chocolatey.org/
|
|
||||||
|
|
||||||
npm:
|
npm:
|
||||||
name: Publish NPM
|
name: Publish NPM
|
||||||
|
|||||||
33
.github/workflows/publish-desktop.yml
vendored
33
.github/workflows/publish-desktop.yml
vendored
@@ -15,7 +15,7 @@ on:
|
|||||||
- Republish
|
- Republish
|
||||||
- Dry Run
|
- Dry Run
|
||||||
version:
|
version:
|
||||||
description: 'Version to publish (default: latest cli release)'
|
description: 'Version to publish (default: latest desktop release)'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
default: latest
|
default: latest
|
||||||
@@ -35,10 +35,6 @@ on:
|
|||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
name: Setup
|
name: Setup
|
||||||
@@ -129,19 +125,15 @@ jobs:
|
|||||||
secrets: "aws-electron-access-id,
|
secrets: "aws-electron-access-id,
|
||||||
aws-electron-access-key,
|
aws-electron-access-key,
|
||||||
aws-electron-bucket-name"
|
aws-electron-bucket-name"
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Create artifacts directory
|
||||||
if: ${{ inputs.publish_type != 'Dry Run' }}
|
run: mkdir -p apps/desktop/artifacts
|
||||||
uses: bitwarden/gh-actions/download-artifacts@main
|
|
||||||
with:
|
|
||||||
workflow: build-desktop.yml
|
|
||||||
workflow_conclusion: success
|
|
||||||
branch: ${{ github.ref_name }}
|
|
||||||
path: apps/desktop/artifacts
|
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
working-directory: apps/desktop/artifacts
|
working-directory: apps/desktop/artifacts
|
||||||
run: gh release download ${{ env._RELEASE_TAG }} -R bitwarden/desktop
|
run: gh release download ${{ env._RELEASE_TAG }} -R bitwarden/clients
|
||||||
|
|
||||||
- name: Set staged rollout percentage
|
- name: Set staged rollout percentage
|
||||||
env:
|
env:
|
||||||
@@ -186,7 +178,7 @@ jobs:
|
|||||||
name: Deploy Snap
|
name: Deploy Snap
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: setup
|
needs: setup
|
||||||
if: ${{ inputs.snap_publish == 'true' }}
|
if: inputs.snap_publish
|
||||||
env:
|
env:
|
||||||
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
_RELEASE_TAG: ${{ needs.setup.outputs.tag-name }}
|
_RELEASE_TAG: ${{ needs.setup.outputs.tag-name }}
|
||||||
@@ -215,7 +207,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
working-directory: apps/desktop/dist
|
working-directory: apps/desktop/dist
|
||||||
run: wget https://github.com/bitwarden/clients/releases/${{ env._RELEASE_TAG }}/download/bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
run: wget https://github.com/bitwarden/clients/releases/download/${{ env._RELEASE_TAG }}/bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
|
|
||||||
- name: Deploy to Snap Store
|
- name: Deploy to Snap Store
|
||||||
if: ${{ inputs.publish_type != 'Dry Run' }}
|
if: ${{ inputs.publish_type != 'Dry Run' }}
|
||||||
@@ -230,7 +222,7 @@ jobs:
|
|||||||
name: Deploy Choco
|
name: Deploy Choco
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
needs: setup
|
needs: setup
|
||||||
if: ${{ inputs.choco_publish == 'true' }}
|
if: inputs.choco_publish
|
||||||
env:
|
env:
|
||||||
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
_RELEASE_TAG: ${{ needs.setup.outputs.tag-name }}
|
_RELEASE_TAG: ${{ needs.setup.outputs.tag-name }}
|
||||||
@@ -256,23 +248,20 @@ jobs:
|
|||||||
secrets: "cli-choco-api-key"
|
secrets: "cli-choco-api-key"
|
||||||
|
|
||||||
- name: Setup Chocolatey
|
- name: Setup Chocolatey
|
||||||
shell: pwsh
|
|
||||||
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: ${{ 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
|
||||||
working-directory: apps/desktop
|
working-directory: apps/desktop
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
working-directory: apps/desktop/dist
|
working-directory: apps/desktop/dist
|
||||||
run: wget https://github.com/bitwarden/clients/releases/${{ env._RELEASE_TAG }}/download/bitwarden.${{ env._PKG_VERSION }}.nupkg
|
run: Invoke-WebRequest -Uri "https://github.com/bitwarden/clients/releases/download/${{ env._RELEASE_TAG }}/bitwarden.${{ env._PKG_VERSION }}.nupkg" -OutFile bitwarden.${{ 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: choco push --source=https://push.chocolatey.org/
|
run: choco push --source=https://push.chocolatey.org/
|
||||||
working-directory: apps/desktop/dist
|
working-directory: apps/desktop/dist
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user