Add all option for version bump workflow (#5150)

This commit is contained in:
Michał Chęciński 2023-04-04 09:21:20 +02:00 committed by GitHub
parent a78ed4c548
commit 3afec3e712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -13,6 +13,7 @@ on:
- CLI
- Desktop
- Web
- All
version_number:
description: "New Version"
required: true
@ -66,27 +67,27 @@ jobs:
### Browser
- name: Bump Browser Version
if: ${{ github.event.inputs.client == 'Browser' }}
if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }}
env:
VERSION: ${{ github.event.inputs.version_number }}
run: npm version --workspace=@bitwarden/browser ${VERSION}
- name: Bump Browser Version - Manifest
if: ${{ github.event.inputs.client == 'Browser' }}
if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }}
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
with:
version: ${{ github.event.inputs.version_number }}
file_path: "apps/browser/src/manifest.json"
- name: Bump Browser Version - Manifest v3
if: ${{ github.event.inputs.client == 'Browser' }}
if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }}
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
with:
version: ${{ github.event.inputs.version_number }}
file_path: "apps/browser/src/manifest.v3.json"
- name: Run Prettier after Browser Version Bump
if: ${{ github.event.inputs.client == 'Browser' }}
if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }}
run: |
npm install -g prettier
prettier --write apps/browser/src/manifest.json
@ -94,20 +95,20 @@ jobs:
### CLI
- name: Bump CLI Version
if: ${{ github.event.inputs.client == 'CLI' }}
if: ${{ github.event.inputs.client == 'CLI' || github.event.inputs.client == 'All' }}
env:
VERSION: ${{ github.event.inputs.version_number }}
run: npm version --workspace=@bitwarden/cli ${VERSION}
### Desktop
- name: Bump Desktop Version - Root
if: ${{ github.event.inputs.client == 'Desktop' }}
if: ${{ github.event.inputs.client == 'Desktop' || github.event.inputs.client == 'All' }}
env:
VERSION: ${{ github.event.inputs.version_number }}
run: npm version --workspace=@bitwarden/desktop ${VERSION}
- name: Bump Desktop Version - App
if: ${{ github.event.inputs.client == 'Desktop' }}
if: ${{ github.event.inputs.client == 'Desktop' || github.event.inputs.client == 'All' }}
env:
VERSION: ${{ github.event.inputs.version_number }}
run: npm version ${VERSION}
@ -115,7 +116,7 @@ jobs:
### Web
- name: Bump Web Version
if: ${{ github.event.inputs.client == 'Web' }}
if: ${{ github.event.inputs.client == 'Web' || github.event.inputs.client == 'All' }}
env:
VERSION: ${{ github.event.inputs.version_number }}
run: npm version --workspace=@bitwarden/web-vault ${VERSION}