mirror of
https://github.com/bitwarden/browser
synced 2026-02-13 15:03:26 +00:00
Merge branch 'main' into ps/extension-refresh
This commit is contained in:
8
.github/CODEOWNERS
vendored
8
.github/CODEOWNERS
vendored
@@ -29,6 +29,7 @@ libs/common/src/models/export @bitwarden/team-tools-dev
|
||||
libs/common/src/tools @bitwarden/team-tools-dev
|
||||
libs/importer @bitwarden/team-tools-dev
|
||||
libs/tools @bitwarden/team-tools-dev
|
||||
bitwarden_license/bit-web/src/app/tools @bitwarden/team-tools-dev
|
||||
|
||||
## Localization/Crowdin (Tools team)
|
||||
apps/browser/src/_locales @bitwarden/team-tools-dev
|
||||
@@ -94,9 +95,10 @@ apps/desktop/src/services/native-message-handler.service.ts @bitwarden/team-auto
|
||||
apps/desktop/src/services/native-messaging.service.ts @bitwarden/team-autofill-dev
|
||||
|
||||
## Component Library ##
|
||||
.storybook @bitwarden/team-component-library
|
||||
libs/components @bitwarden/team-component-library
|
||||
apps/web/src/app/layouts/header
|
||||
.storybook @bitwarden/team-design-system
|
||||
libs/components @bitwarden/team-design-system
|
||||
apps/browser/src/platform/popup/layout @bitwarden/team-design-system
|
||||
apps/web/src/app/layouts @bitwarden/team-design-system
|
||||
|
||||
## Desktop native module ##
|
||||
apps/desktop/desktop_native @bitwarden/team-platform-dev
|
||||
|
||||
54
.github/renovate.json
vendored
54
.github/renovate.json
vendored
@@ -105,6 +105,26 @@
|
||||
"commitMessagePrefix": "[deps] Billing:",
|
||||
"reviewers": ["team:team-billing-dev"]
|
||||
},
|
||||
{
|
||||
"matchPackageNames": [
|
||||
"@types/argon2-browser",
|
||||
"@types/chrome",
|
||||
"@types/firefox-webext-browser",
|
||||
"@types/jquery",
|
||||
"@types/node",
|
||||
"@types/node-forge",
|
||||
"argon2",
|
||||
"argon2-browser",
|
||||
"big-integer",
|
||||
"node-forge",
|
||||
"rxjs",
|
||||
"type-fest",
|
||||
"typescript"
|
||||
],
|
||||
"description": "Platform owned dependencies",
|
||||
"commitMessagePrefix": "[deps] Platform:",
|
||||
"reviewers": ["team:team-platform-dev"]
|
||||
},
|
||||
{
|
||||
"matchPackageNames": [
|
||||
"@angular-devkit/build-angular",
|
||||
@@ -119,30 +139,6 @@
|
||||
"@angular/platform",
|
||||
"@angular/compiler",
|
||||
"@angular/router",
|
||||
"@types/argon2-browser",
|
||||
"@types/chrome",
|
||||
"@types/firefox-webext-browser",
|
||||
"@types/jquery",
|
||||
"@types/node",
|
||||
"@types/node-forge",
|
||||
"argon2",
|
||||
"argon2-browser",
|
||||
"big-integer",
|
||||
"bootstrap",
|
||||
"jquery",
|
||||
"node-forge",
|
||||
"popper.js",
|
||||
"rxjs",
|
||||
"type-fest",
|
||||
"typescript",
|
||||
"zone.js"
|
||||
],
|
||||
"description": "Platform owned dependencies",
|
||||
"commitMessagePrefix": "[deps] Platform:",
|
||||
"reviewers": ["team:team-platform-dev"]
|
||||
},
|
||||
{
|
||||
"matchPackageNames": [
|
||||
"@compodoc/compodoc",
|
||||
"@ng-select/ng-select",
|
||||
"@storybook/addon-a11y",
|
||||
@@ -153,17 +149,21 @@
|
||||
"@storybook/angular",
|
||||
"@types/react",
|
||||
"autoprefixer",
|
||||
"bootstrap",
|
||||
"chromatic",
|
||||
"jquery",
|
||||
"ngx-toastr",
|
||||
"popper.js",
|
||||
"react",
|
||||
"react-dom",
|
||||
"remark-gfm",
|
||||
"storybook",
|
||||
"tailwindcss"
|
||||
"tailwindcss",
|
||||
"zone.js"
|
||||
],
|
||||
"description": "Component library owned dependencies",
|
||||
"commitMessagePrefix": "[deps] Platform (CL):",
|
||||
"reviewers": ["team:team-component-library"]
|
||||
"commitMessagePrefix": "[deps] Design System:",
|
||||
"reviewers": ["team:team-design-system"]
|
||||
},
|
||||
{
|
||||
"matchPackageNames": [
|
||||
|
||||
3
.github/whitelist-capital-letters.txt
vendored
3
.github/whitelist-capital-letters.txt
vendored
@@ -8,6 +8,7 @@
|
||||
./libs/admin-console/README.md
|
||||
./libs/auth/README.md
|
||||
./libs/billing/README.md
|
||||
./libs/common/src/tools/integration/README.md
|
||||
./libs/platform/README.md
|
||||
./libs/tools/README.md
|
||||
./libs/tools/export/vault-export/README.md
|
||||
@@ -28,8 +29,6 @@
|
||||
./apps/desktop/resources/appx/Wide310x150Logo.png
|
||||
./apps/desktop/resources/appx/Square44x44Logo.png
|
||||
./apps/desktop/README.md
|
||||
./apps/desktop/desktop_native/Cargo.toml
|
||||
./apps/desktop/desktop_native/Cargo.lock
|
||||
./apps/cli/stores/chocolatey/tools/VERIFICATION.txt
|
||||
./apps/cli/README.md
|
||||
./apps/browser/README.md
|
||||
|
||||
64
.github/workflows/build-cli.yml
vendored
64
.github/workflows/build-cli.yml
vendored
@@ -71,8 +71,8 @@ jobs:
|
||||
]
|
||||
license_type:
|
||||
[
|
||||
{ prefix: "oss", readable: "open source license" },
|
||||
{ prefix: "bit", readable: "commercial license"}
|
||||
{ build_prefix: "oss", artifact_prefix: "-oss", readable: "open source license" },
|
||||
{ build_prefix: "bit", artifact_prefix: "", readable: "commercial license"}
|
||||
]
|
||||
runs-on: ${{ matrix.os.distro }}
|
||||
needs:
|
||||
@@ -104,16 +104,16 @@ jobs:
|
||||
working-directory: ./
|
||||
|
||||
- name: Build & Package Unix
|
||||
run: npm run dist:${{ matrix.license_type.prefix }}:${{ env.SHORT_RUNNER_OS }} --quiet
|
||||
run: npm run dist:${{ matrix.license_type.build_prefix }}:${{ env.SHORT_RUNNER_OS }} --quiet
|
||||
|
||||
- name: Zip Unix
|
||||
run: |
|
||||
cd ./dist/${{ matrix.license_type.prefix }}/${{ env.LOWER_RUNNER_OS }}
|
||||
zip ../../bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip ./bw
|
||||
cd ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }}
|
||||
zip ../../bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip ./bw
|
||||
|
||||
- name: Version Test
|
||||
run: |
|
||||
unzip "./dist/bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip" -d "./test"
|
||||
unzip "./dist/bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip" -d "./test"
|
||||
testVersion=$(./test/bw -v)
|
||||
echo "version: $_PACKAGE_VERSION"
|
||||
echo "testVersion: $testVersion"
|
||||
@@ -125,21 +125,22 @@ jobs:
|
||||
- name: Create checksums Unix
|
||||
run: |
|
||||
cd ./dist
|
||||
shasum -a 256 bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip \
|
||||
| awk '{split($0, a); print a[1]}' > bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
shasum -a 256 bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip \
|
||||
| awk '{split($0, a); print a[1]}' > bw${{
|
||||
matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
|
||||
- name: Upload unix zip asset
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip
|
||||
path: apps/cli/dist/bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip
|
||||
name: bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip
|
||||
path: apps/cli/dist/bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload unix checksum asset
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
path: apps/cli/dist/bw-${{ matrix.license_type.prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
name: bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
path: apps/cli/dist/bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
if-no-files-found: error
|
||||
|
||||
cli-windows:
|
||||
@@ -148,8 +149,8 @@ jobs:
|
||||
matrix:
|
||||
license_type:
|
||||
[
|
||||
{ prefix: "oss", readable: "open source license" },
|
||||
{ prefix: "bit", readable: "commercial license"}
|
||||
{ build_prefix: "oss", artifact_prefix: "-oss", readable: "open source license" },
|
||||
{ build_prefix: "bit", artifact_prefix: "", readable: "commercial license"}
|
||||
]
|
||||
runs-on: windows-2022
|
||||
needs:
|
||||
@@ -236,26 +237,26 @@ jobs:
|
||||
working-directory: ./
|
||||
|
||||
- name: Build & Package Windows
|
||||
run: npm run dist:${{ matrix.license_type.prefix }}:win --quiet
|
||||
run: npm run dist:${{ matrix.license_type.build_prefix }}:win --quiet
|
||||
|
||||
- name: Package Chocolatey
|
||||
shell: pwsh
|
||||
if: ${{ matrix.license_type.prefix }} == 'oss'
|
||||
if: ${{ matrix.license_type.build_prefix }} == 'bit'
|
||||
run: |
|
||||
Copy-Item -Path stores/chocolatey -Destination dist/chocolatey -Recurse
|
||||
Copy-Item dist/${{ matrix.license_type.prefix }}/windows/bw.exe -Destination dist/chocolatey/tools
|
||||
Copy-Item dist/${{ matrix.license_type.build_prefix }}/windows/bw.exe -Destination dist/chocolatey/tools
|
||||
Copy-Item ${{ github.workspace }}/LICENSE.txt -Destination dist/chocolatey/tools
|
||||
choco pack dist/chocolatey/bitwarden-cli.nuspec --version ${{ env._PACKAGE_VERSION }} --out dist/chocolatey
|
||||
|
||||
- name: Zip Windows
|
||||
shell: cmd
|
||||
run: 7z a ./dist/bw-${{ matrix.license_type.prefix }}-windows-%_PACKAGE_VERSION%.zip ./dist/${{ matrix.license_type.prefix }}/windows/bw.exe
|
||||
run: 7z a ./dist/bw${{ matrix.license_type.artifact_prefix}}-windows-%_PACKAGE_VERSION%.zip ./dist/${{ matrix.license_type.build_prefix }}/windows/bw.exe
|
||||
|
||||
- name: Version Test
|
||||
run: |
|
||||
dir ./dist/
|
||||
Expand-Archive -Path "./dist/bw-${{ matrix.license_type.prefix }}-windows-${env:_PACKAGE_VERSION}.zip" -DestinationPath "./test/${{ matrix.license_type.prefix }}/windows"
|
||||
$testVersion = Invoke-Expression '& ./test/${{ matrix.license_type.prefix }}/windows/bw.exe -v'
|
||||
Expand-Archive -Path "./dist/bw${{ matrix.license_type.artifact_prefix }}-windows-${env:_PACKAGE_VERSION}.zip" -DestinationPath "./test/${{ matrix.license_type.build_prefix }}/windows"
|
||||
$testVersion = Invoke-Expression '& ./test/${{ matrix.license_type.build_prefix }}/windows/bw.exe -v'
|
||||
echo "version: $env:_PACKAGE_VERSION"
|
||||
echo "testVersion: $testVersion"
|
||||
if($testVersion -ne $env:_PACKAGE_VERSION) {
|
||||
@@ -264,25 +265,25 @@ jobs:
|
||||
|
||||
- name: Create checksums Windows
|
||||
run: |
|
||||
checksum -f="./dist/bw-${{ matrix.license_type.prefix }}-windows-${env:_PACKAGE_VERSION}.zip" `
|
||||
-t sha256 | Out-File -Encoding ASCII ./dist/bw-${{ matrix.license_type.prefix }}-windows-sha256-${env:_PACKAGE_VERSION}.txt
|
||||
checksum -f="./dist/bw${{ matrix.license_type.artifact_prefix }}-windows-${env:_PACKAGE_VERSION}.zip" `
|
||||
-t sha256 | Out-File -Encoding ASCII ./dist/bw${{ matrix.license_type.artifact_prefix }}-windows-sha256-${env:_PACKAGE_VERSION}.txt
|
||||
|
||||
- name: Upload windows zip asset
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: bw-${{ matrix.license_type.prefix }}-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||
path: apps/cli/dist/bw-${{ matrix.license_type.prefix }}-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||
name: bw${{ matrix.license_type.artifact_prefix }}-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||
path: apps/cli/dist/bw${{ matrix.license_type.artifact_prefix }}-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload windows checksum asset
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: bw-${{ matrix.license_type.prefix }}-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
path: apps/cli/dist/bw-${{ matrix.license_type.prefix }}-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
name: bw${{ matrix.license_type.artifact_prefix }}-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
path: apps/cli/dist/bw${{ matrix.license_type.artifact_prefix }}-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Chocolatey asset
|
||||
if: matrix.license_type.prefix == 'oss'
|
||||
if: matrix.license_type.build_prefix == 'bit'
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: bitwarden-cli.${{ env._PACKAGE_VERSION }}.nupkg
|
||||
@@ -290,7 +291,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload NPM Build Directory asset
|
||||
if: matrix.license_type.prefix == 'oss'
|
||||
if: matrix.license_type.build_prefix == 'bit'
|
||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||
with:
|
||||
name: bitwarden-cli-${{ env._PACKAGE_VERSION }}-npm-build.zip
|
||||
@@ -320,14 +321,9 @@ jobs:
|
||||
- name: Get bw linux cli
|
||||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||
with:
|
||||
name: bw-oss-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||
name: bw-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||
path: apps/cli/dist/snap
|
||||
|
||||
- name: Rename snap artifact
|
||||
run: |
|
||||
cd dist/snap
|
||||
mv bw-oss-linux-${{ env._PACKAGE_VERSION }}.zip bw-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||
|
||||
- name: Setup Snap Package
|
||||
run: |
|
||||
cp -r stores/snap/* -t dist/snap
|
||||
|
||||
36
.github/workflows/build-desktop.yml
vendored
36
.github/workflows/build-desktop.yml
vendored
@@ -173,14 +173,14 @@ jobs:
|
||||
id: cache
|
||||
with:
|
||||
path: |
|
||||
apps/desktop/desktop_native/*.node
|
||||
apps/desktop/desktop_native/napi/*.node
|
||||
${{ env.RUNNER_TEMP }}/.cargo/registry
|
||||
${{ env.RUNNER_TEMP }}/.cargo/git
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
working-directory: apps/desktop/desktop_native/napi
|
||||
env:
|
||||
PKG_CONFIG_ALLOW_CROSS: true
|
||||
PKG_CONFIG_ALL_STATIC: true
|
||||
@@ -301,12 +301,12 @@ jobs:
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
||||
id: cache
|
||||
with:
|
||||
path: apps/desktop/desktop_native/*.node
|
||||
path: apps/desktop/desktop_native/napi/*.node
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
working-directory: apps/desktop/desktop_native/napi
|
||||
run: npm run build:cross-platform
|
||||
|
||||
- name: Build & Sign (dev)
|
||||
@@ -464,6 +464,9 @@ jobs:
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
node-version: ${{ env._NODE_VERSION }}
|
||||
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
@@ -581,12 +584,12 @@ jobs:
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
||||
id: cache
|
||||
with:
|
||||
path: apps/desktop/desktop_native/*.node
|
||||
path: apps/desktop/desktop_native/napi/*.node
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
working-directory: apps/desktop/desktop_native/napi
|
||||
run: npm run build:cross-platform
|
||||
|
||||
- name: Build application (dev)
|
||||
@@ -625,6 +628,9 @@ jobs:
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
node-version: ${{ env._NODE_VERSION }}
|
||||
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
@@ -742,12 +748,12 @@ jobs:
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
||||
id: cache
|
||||
with:
|
||||
path: apps/desktop/desktop_native/*.node
|
||||
path: apps/desktop/desktop_native/napi/*.node
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
working-directory: apps/desktop/desktop_native/napi
|
||||
run: npm run build:cross-platform
|
||||
|
||||
- name: Build
|
||||
@@ -831,6 +837,9 @@ jobs:
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
node-version: ${{ env._NODE_VERSION }}
|
||||
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
@@ -948,12 +957,12 @@ jobs:
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
||||
id: cache
|
||||
with:
|
||||
path: apps/desktop/desktop_native/*.node
|
||||
path: apps/desktop/desktop_native/napi/*.node
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
working-directory: apps/desktop/desktop_native/napi
|
||||
run: npm run build:cross-platform
|
||||
|
||||
- name: Build
|
||||
@@ -1028,6 +1037,9 @@ jobs:
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
node-version: ${{ env._NODE_VERSION }}
|
||||
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
@@ -1140,12 +1152,12 @@ jobs:
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
||||
id: cache
|
||||
with:
|
||||
path: apps/desktop/desktop_native/*.node
|
||||
path: apps/desktop/desktop_native/napi/*.node
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
working-directory: apps/desktop/desktop_native/napi
|
||||
run: npm run build:cross-platform
|
||||
|
||||
- name: Build
|
||||
|
||||
43
.github/workflows/deploy-web.yml
vendored
43
.github/workflows/deploy-web.yml
vendored
@@ -119,6 +119,49 @@ jobs:
|
||||
# Set the sync utility to use for deployment to the environment (az-sync or azcopy)
|
||||
echo "sync-utility=azcopy" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Environment Protection
|
||||
env:
|
||||
BUILD_WEB_RUN_ID: ${{ inputs.build-web-run-id }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
BRANCH_OR_TAG_LOWER=""
|
||||
if [[ "$BUILD_WEB_RUN_ID" == "" ]]; then
|
||||
BRANCH_OR_TAG_LOWER=$(echo ${{ inputs.branch-or-tag }} | awk '{print tolower($0)}')
|
||||
else
|
||||
BRANCH_OR_TAG_LOWER=$(gh api /repos/bitwarden/clients/actions/runs/$BUILD_WEB_RUN_ID/artifacts --jq '.artifacts[0].workflow_run.head_branch' | awk '{print tolower($0)}')
|
||||
fi
|
||||
|
||||
echo "Branch/Tag: $BRANCH_OR_TAG_LOWER"
|
||||
|
||||
PROD_ENV_PATTERN='USPROD|EUPROD'
|
||||
PROD_ALLOWED_TAGS_PATTERN='web-v[0-9]+\.[0-9]+\.[0-9]+'
|
||||
|
||||
QA_ENV_PATTERN='USQA|EUQA'
|
||||
QA_ALLOWED_TAGS_PATTERN='.*'
|
||||
|
||||
DEV_ENV_PATTERN='USDEV'
|
||||
DEV_ALLOWED_TAGS_PATTERN='main'
|
||||
|
||||
if [[ \
|
||||
${{ inputs.environment }} =~ \.*($PROD_ENV_PATTERN)\.* && \
|
||||
! "$BRANCH_OR_TAG_LOWER" =~ ^($PROD_ALLOWED_TAGS_PATTERN).* \
|
||||
]] || [[ \
|
||||
${{ inputs.environment }} =~ \.*($QA_ENV_PATTERN)\.* && \
|
||||
! "$BRANCH_OR_TAG_LOWER" =~ ^($QA_ALLOWED_TAGS_PATTERN).* \
|
||||
]] || [[ \
|
||||
${{ inputs.environment }} =~ \.*($DEV_ENV_PATTERN)\.* && \
|
||||
$BRANCH_OR_TAG_LOWER != $DEV_ALLOWED_TAGS_PATTERN \
|
||||
]]; then
|
||||
echo "!Deployment blocked!"
|
||||
echo "Attempting to deploy a tag that is not allowed in ${{ inputs.environment }} environment"
|
||||
echo
|
||||
echo "Environment: ${{ inputs.environment }}"
|
||||
echo "Tag: $BRANCH_OR_TAG_LOWER"
|
||||
exit 1
|
||||
else
|
||||
echo "The input Branch/Tag: '$BRANCH_OR_TAG_LOWER' is allowed to deploy on ${{ inputs.environment }} environment"
|
||||
fi
|
||||
|
||||
approval:
|
||||
name: Approval for Deployment to ${{ needs.setup.outputs.environment-name }}
|
||||
needs: setup
|
||||
|
||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -35,6 +35,8 @@ jobs:
|
||||
! -path "*/.DS_Store" \
|
||||
! -path "*/*locales/*" \
|
||||
! -path "./.github/*" \
|
||||
! -path "*/Cargo.toml" \
|
||||
! -path "*/Cargo.lock" \
|
||||
> tmp.txt
|
||||
diff <(sort .github/whitelist-capital-letters.txt) <(sort tmp.txt)
|
||||
|
||||
|
||||
12
.github/workflows/release-cli.yml
vendored
12
.github/workflows/release-cli.yml
vendored
@@ -102,16 +102,16 @@ jobs:
|
||||
with:
|
||||
artifacts: "apps/cli/bw-oss-windows-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-oss-windows-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-bit-windows-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-bit-windows-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-windows-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-windows-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-oss-macos-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-oss-macos-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-bit-macos-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-bit-macos-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-macos-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-macos-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-oss-linux-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-oss-linux-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-bit-linux-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-bit-linux-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bw-linux-${{ env.PKG_VERSION }}.zip,
|
||||
apps/cli/bw-linux-sha256-${{ env.PKG_VERSION }}.txt,
|
||||
apps/cli/bitwarden-cli.${{ env.PKG_VERSION }}.nupkg,
|
||||
apps/cli/bw_${{ env.PKG_VERSION }}_amd64.snap,
|
||||
apps/cli/bw-snap-sha256-${{ env.PKG_VERSION }}.txt"
|
||||
|
||||
8
.github/workflows/release-desktop.yml
vendored
8
.github/workflows/release-desktop.yml
vendored
@@ -29,11 +29,6 @@ on:
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
electron_publish:
|
||||
description: 'Publish Electron to S3 bucket'
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
github_release:
|
||||
description: 'Publish GitHub release'
|
||||
required: true
|
||||
@@ -142,7 +137,6 @@ jobs:
|
||||
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive
|
||||
|
||||
- name: Set staged rollout percentage
|
||||
if: ${{ github.event.inputs.electron_publish == 'true' }}
|
||||
env:
|
||||
RELEASE_CHANNEL: ${{ steps.release-channel.outputs.channel }}
|
||||
ROLLOUT_PCT: ${{ inputs.rollout_percentage }}
|
||||
@@ -152,7 +146,7 @@ jobs:
|
||||
echo "stagingPercentage: ${ROLLOUT_PCT}" >> apps/desktop/artifacts/${RELEASE_CHANNEL}-mac.yml
|
||||
|
||||
- name: Publish artifacts to S3
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' && github.event.inputs.electron_publish == 'true' }}
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ steps.retrieve-secrets.outputs.aws-electron-access-id }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ steps.retrieve-secrets.outputs.aws-electron-access-key }}
|
||||
|
||||
6
.github/workflows/staged-rollout-desktop.yml
vendored
6
.github/workflows/staged-rollout-desktop.yml
vendored
@@ -41,11 +41,11 @@ jobs:
|
||||
AWS_S3_BUCKET_NAME: ${{ steps.retrieve-secrets.outputs.aws-electron-bucket-name }}
|
||||
run: |
|
||||
aws s3 cp $AWS_S3_BUCKET_NAME/desktop/latest.yml . \
|
||||
--quiet \
|
||||
--quiet
|
||||
aws s3 cp $AWS_S3_BUCKET_NAME/desktop/latest-linux.yml . \
|
||||
--quiet \
|
||||
--quiet
|
||||
aws s3 cp $AWS_S3_BUCKET_NAME/desktop/latest-mac.yml . \
|
||||
--quiet \
|
||||
--quiet
|
||||
|
||||
- name: Check new rollout percentage
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user