1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

DEVOPS-869 - Fix Web Version bump (#3105)

This commit is contained in:
Vince Grassia
2022-07-14 12:36:00 -04:00
committed by GitHub
parent 6a8fb0a053
commit 97f544f7e1

View File

@@ -33,12 +33,13 @@ jobs:
id: branch id: branch
env: env:
CLIENT_NAME: ${{ github.event.inputs.client }} CLIENT_NAME: ${{ github.event.inputs.client }}
VERSION: ${{ github.event.inputs.version_number }}
run: | run: |
CLIENT=$(python -c "print('$CLIENT_NAME'.lower())") CLIENT=$(python -c "print('$CLIENT_NAME'.lower())")
echo "::set-output name=client::$CLIENT" echo "::set-output name=client::$CLIENT"
git switch -c ${CLIENT}_version_bump_${{ github.event.inputs.version_number }} git switch -c ${CLIENT}_version_bump_${VERSION}
git push -u origin ${CLIENT}_version_bump_${{ github.event.inputs.version_number }} git push -u origin ${CLIENT}_version_bump_${VERSION}
- name: Checkout Version Branch - name: Checkout Version Branch
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
@@ -50,6 +51,12 @@ jobs:
######################## ########################
### Browser ### 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 - name: Bump Browser Version - Manifest
if: ${{ github.event.inputs.client == 'Browser' }} if: ${{ github.event.inputs.client == 'Browser' }}
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945 uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945
@@ -57,64 +64,64 @@ jobs:
version: ${{ github.event.inputs.version_number }} version: ${{ github.event.inputs.version_number }}
file_path: "apps/browser/src/manifest.json" 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 - name: Run Prettier after Browser Version Bump
if: ${{ github.event.inputs.client == 'Browser' }} if: ${{ github.event.inputs.client == 'Browser' }}
run: | run: |
npm install -g prettier npm install -g prettier
prettier --write apps/browser/src/manifest.json prettier --write apps/browser/src/manifest.json
prettier --write apps/browser/src/manifest.v3.json
### CLI ### CLI
- name: Bump CLI Version - Package - name: Bump CLI Version
if: ${{ github.event.inputs.client == 'CLI' }} if: ${{ github.event.inputs.client == 'CLI' }}
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945 env:
with: VERSION: ${{ github.event.inputs.version_number }}
version: ${{ github.event.inputs.version_number }} run: npm version --workspace=@bitwarden/cli ${VERSION}
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"
### Desktop ### Desktop
- name: Bump Desktop Version - Package - name: Bump Desktop Version - Root
if: ${{ github.event.inputs.client == 'Desktop' }} if: ${{ github.event.inputs.client == 'Desktop' }}
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945 env:
with: VERSION: ${{ github.event.inputs.version_number }}
version: ${{ github.event.inputs.version_number }} run: npm version --workspace=@bitwarden/desktop ${VERSION}
file_path: "apps/desktop/src/package.json"
- 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 ### Web
- name: Bump Web Version - package.json - name: Bump Web Version
if: ${{ github.event.inputs.client == 'Web' }} if: ${{ github.event.inputs.client == 'Web' }}
uses: bitwarden/gh-actions/version-bump@03ad9a873c39cdc95dd8d77dbbda67f84db43945 env:
with: VERSION: ${{ github.event.inputs.version_number }}
version: ${{ github.event.inputs.version_number }} run: npm version --workspace=@bitwarden/web-vault ${VERSION}
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"
######################## ########################
- name: Commit files - name: Commit files
env: env:
CLIENT: ${{ steps.branch.outputs.client }} CLIENT: ${{ steps.branch.outputs.client }}
VERSION: ${{ github.event.inputs.version_number }}
run: | run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]" 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 - name: Push changes
env: env:
CLIENT: ${{ steps.branch.outputs.client }} 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 - name: Create Bump Version PR
env: env: