mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
DEVOPS-869 - Fix Web Version bump (#3105)
This commit is contained in:
parent
6a8fb0a053
commit
97f544f7e1
73
.github/workflows/version-bump.yml
vendored
73
.github/workflows/version-bump.yml
vendored
@ -33,12 +33,13 @@ jobs:
|
||||
id: branch
|
||||
env:
|
||||
CLIENT_NAME: ${{ github.event.inputs.client }}
|
||||
VERSION: ${{ github.event.inputs.version_number }}
|
||||
run: |
|
||||
CLIENT=$(python -c "print('$CLIENT_NAME'.lower())")
|
||||
echo "::set-output name=client::$CLIENT"
|
||||
|
||||
git switch -c ${CLIENT}_version_bump_${{ github.event.inputs.version_number }}
|
||||
git push -u origin ${CLIENT}_version_bump_${{ github.event.inputs.version_number }}
|
||||
git switch -c ${CLIENT}_version_bump_${VERSION}
|
||||
git push -u origin ${CLIENT}_version_bump_${VERSION}
|
||||
|
||||
- name: Checkout Version Branch
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
@ -50,6 +51,12 @@ jobs:
|
||||
########################
|
||||
|
||||
### Browser
|
||||
- name: Bump Browser Version
|
||||
if: ${{ github.event.inputs.client == 'Browser' }}
|
||||
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' }}
|
||||
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
|
||||
@ -57,64 +64,64 @@ jobs:
|
||||
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' }}
|
||||
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' }}
|
||||
run: |
|
||||
npm install -g prettier
|
||||
prettier --write apps/browser/src/manifest.json
|
||||
prettier --write apps/browser/src/manifest.v3.json
|
||||
|
||||
### CLI
|
||||
- name: Bump CLI Version - Package
|
||||
- name: Bump CLI Version
|
||||
if: ${{ github.event.inputs.client == 'CLI' }}
|
||||
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/cli/package.json"
|
||||
|
||||
- name: Bump CLI Version - Package-lock
|
||||
if: ${{ github.event.inputs.client == 'CLI' }}
|
||||
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/cli/package-lock.json"
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version_number }}
|
||||
run: npm version --workspace=@bitwarden/cli ${VERSION}
|
||||
|
||||
### Desktop
|
||||
- name: Bump Desktop Version - Package
|
||||
- name: Bump Desktop Version - Root
|
||||
if: ${{ github.event.inputs.client == 'Desktop' }}
|
||||
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/desktop/src/package.json"
|
||||
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' }}
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version_number }}
|
||||
run: npm version ${VERSION}
|
||||
working-directory: "apps/desktop/src"
|
||||
|
||||
### Web
|
||||
- name: Bump Web Version - package.json
|
||||
- name: Bump Web Version
|
||||
if: ${{ github.event.inputs.client == 'Web' }}
|
||||
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/web/package.json"
|
||||
|
||||
- name: Bump Web Version - package-lock.json
|
||||
if: ${{ github.event.inputs.client == 'Web' }}
|
||||
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/web/package-lock.json"
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version_number }}
|
||||
run: npm version --workspace=@bitwarden/web-vault ${VERSION}
|
||||
|
||||
########################
|
||||
|
||||
- name: Commit files
|
||||
env:
|
||||
CLIENT: ${{ steps.branch.outputs.client }}
|
||||
VERSION: ${{ github.event.inputs.version_number }}
|
||||
run: |
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -m "Bumped ${CLIENT} version to ${{ github.event.inputs.version_number }}" -a
|
||||
git commit -m "Bumped ${CLIENT} version to ${VERSION}" -a
|
||||
|
||||
- name: Push changes
|
||||
env:
|
||||
CLIENT: ${{ steps.branch.outputs.client }}
|
||||
run: git push -u origin ${CLIENT}_version_bump_${{ github.event.inputs.version_number }}
|
||||
VERSION: ${{ github.event.inputs.version_number }}
|
||||
run: git push -u origin ${CLIENT}_version_bump_${VERSION}
|
||||
|
||||
- name: Create Bump Version PR
|
||||
env:
|
||||
|
Loading…
Reference in New Issue
Block a user