Skip to content

Commit 47a5e60

Browse files
authored
Merge branch 'main' into km/new-pin-service-interface
2 parents 528607a + 7cd9832 commit 47a5e60

File tree

234 files changed

+8724
-1597
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+8724
-1597
lines changed

.github/workflows/build-browser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
ref: ${{ github.event.pull_request.head.sha }}
148148

149149
- name: Set up Node
150-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
150+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
151151
with:
152152
cache: 'npm'
153153
cache-dependency-path: '**/package-lock.json'
@@ -248,7 +248,7 @@ jobs:
248248
ref: ${{ github.event.pull_request.head.sha }}
249249

250250
- name: Set up Node
251-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
251+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
252252
with:
253253
cache: 'npm'
254254
cache-dependency-path: '**/package-lock.json'
@@ -359,7 +359,7 @@ jobs:
359359
ref: ${{ github.event.pull_request.head.sha }}
360360

361361
- name: Set up Node
362-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
362+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
363363
with:
364364
cache: 'npm'
365365
cache-dependency-path: '**/package-lock.json'

.github/workflows/build-cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
awk '{print tolower($0)}')" >> $GITHUB_ENV
125125
126126
- name: Set up Node
127-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
127+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
128128
with:
129129
cache: 'npm'
130130
cache-dependency-path: '**/package-lock.json'
@@ -302,7 +302,7 @@ jobs:
302302
choco install nasm --no-progress
303303
304304
- name: Set up Node
305-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
305+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
306306
with:
307307
cache: 'npm'
308308
cache-dependency-path: '**/package-lock.json'

.github/workflows/build-desktop.yml

Lines changed: 239 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
ref: ${{ github.event.pull_request.head.sha }}
175175

176176
- name: Set up Node
177-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
177+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
178178
with:
179179
cache: 'npm'
180180
cache-dependency-path: '**/package-lock.json'
@@ -323,7 +323,7 @@ jobs:
323323
ref: ${{ github.event.pull_request.head.sha }}
324324

325325
- name: Set up Node
326-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
326+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
327327
with:
328328
cache: 'npm'
329329
cache-dependency-path: '**/package-lock.json'
@@ -429,7 +429,7 @@ jobs:
429429
ref: ${{ github.event.pull_request.head.sha }}
430430

431431
- name: Set up Node
432-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
432+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
433433
with:
434434
cache: 'npm'
435435
cache-dependency-path: '**/package-lock.json'
@@ -665,6 +665,239 @@ jobs:
665665
path: apps/desktop/dist/nsis-web/${{ needs.setup.outputs.release_channel }}.yml
666666
if-no-files-found: error
667667

668+
windows-beta:
669+
name: Windows Beta Build
670+
runs-on: windows-2022
671+
needs: setup
672+
permissions:
673+
contents: read
674+
id-token: write
675+
defaults:
676+
run:
677+
shell: pwsh
678+
working-directory: apps/desktop
679+
env:
680+
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
681+
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
682+
NODE_OPTIONS: --max_old_space_size=4096
683+
steps:
684+
- name: Check out repo
685+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
686+
with:
687+
ref: ${{ github.event.pull_request.head.sha }}
688+
689+
- name: Set up Node
690+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
691+
with:
692+
cache: 'npm'
693+
cache-dependency-path: '**/package-lock.json'
694+
node-version: ${{ env._NODE_VERSION }}
695+
696+
- name: Install AST
697+
run: dotnet tool install --global AzureSignTool --version 4.0.1
698+
699+
- name: Print environment
700+
run: |
701+
node --version
702+
npm --version
703+
choco --version
704+
rustup show
705+
706+
- name: Log in to Azure
707+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
708+
uses: bitwarden/gh-actions/azure-login@main
709+
with:
710+
subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
711+
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
712+
client_id: ${{ secrets.AZURE_CLIENT_ID }}
713+
714+
- name: Retrieve secrets
715+
id: retrieve-secrets
716+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
717+
uses: bitwarden/gh-actions/get-keyvault-secrets@main
718+
with:
719+
keyvault: "bitwarden-ci"
720+
secrets: "code-signing-vault-url,
721+
code-signing-client-id,
722+
code-signing-tenant-id,
723+
code-signing-client-secret,
724+
code-signing-cert-name"
725+
726+
- name: Log out from Azure
727+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
728+
uses: bitwarden/gh-actions/azure-logout@main
729+
730+
- name: Install Node dependencies
731+
run: npm ci
732+
working-directory: ./
733+
734+
- name: Download SDK Artifacts
735+
if: ${{ inputs.sdk_branch != '' && needs.setup.outputs.has_secrets == 'true' }}
736+
uses: bitwarden/gh-actions/download-artifacts@main
737+
with:
738+
github_token: ${{ secrets.GITHUB_TOKEN }}
739+
workflow: build-wasm-internal.yml
740+
workflow_conclusion: success
741+
branch: ${{ inputs.sdk_branch }}
742+
artifacts: sdk-internal
743+
repo: bitwarden/sdk-internal
744+
path: ../sdk-internal
745+
if_no_artifact_found: fail
746+
747+
- name: Override SDK
748+
if: ${{ inputs.sdk_branch != '' && needs.setup.outputs.has_secrets == 'true' }}
749+
working-directory: ./
750+
run: |
751+
ls -l ../
752+
npm link ../sdk-internal
753+
754+
- name: Cache Native Module
755+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
756+
id: cache
757+
with:
758+
path: |
759+
apps/desktop/desktop_native/napi/*.node
760+
apps/desktop/desktop_native/dist/*
761+
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
762+
763+
- name: Build Native Module
764+
if: steps.cache.outputs.cache-hit != 'true'
765+
working-directory: apps/desktop/desktop_native
766+
run: node build.js cross-platform
767+
768+
- name: Build
769+
run: npm run build
770+
771+
- name: Pack
772+
if: ${{ needs.setup.outputs.has_secrets == 'false' }}
773+
run: npm run pack:win:beta
774+
775+
- name: Pack & Sign
776+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
777+
env:
778+
ELECTRON_BUILDER_SIGN: 1
779+
SIGNING_VAULT_URL: ${{ steps.retrieve-secrets.outputs.code-signing-vault-url }}
780+
SIGNING_CLIENT_ID: ${{ steps.retrieve-secrets.outputs.code-signing-client-id }}
781+
SIGNING_TENANT_ID: ${{ steps.retrieve-secrets.outputs.code-signing-tenant-id }}
782+
SIGNING_CLIENT_SECRET: ${{ steps.retrieve-secrets.outputs.code-signing-client-secret }}
783+
SIGNING_CERT_NAME: ${{ steps.retrieve-secrets.outputs.code-signing-cert-name }}
784+
run: npm run pack:win:beta
785+
786+
- name: Rename appx files for store
787+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
788+
run: |
789+
Copy-Item "./dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32.appx" `
790+
-Destination "./dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32-store.appx"
791+
Copy-Item "./dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64.appx" `
792+
-Destination "./dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64-store.appx"
793+
Copy-Item "./dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64.appx" `
794+
-Destination "./dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64-store.appx"
795+
796+
- name: Fix NSIS artifact names for auto-updater
797+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
798+
run: |
799+
Rename-Item -Path .\dist\nsis-web\Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z `
800+
-NewName bitwarden-beta-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z
801+
Rename-Item -Path .\dist\nsis-web\Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64.nsis.7z `
802+
-NewName bitwarden-beta-${{ env._PACKAGE_VERSION }}-x64.nsis.7z
803+
Rename-Item -Path .\dist\nsis-web\Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z `
804+
-NewName bitwarden-beta-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z
805+
806+
- name: Upload portable exe artifact
807+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
808+
with:
809+
name: Bitwarden-Beta-Portable-${{ env._PACKAGE_VERSION }}.exe
810+
path: apps/desktop/dist/Bitwarden-Beta-Portable-${{ env._PACKAGE_VERSION }}.exe
811+
if-no-files-found: error
812+
813+
- name: Upload installer exe artifact
814+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
815+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
816+
with:
817+
name: Bitwarden-Beta-Installer-${{ env._PACKAGE_VERSION }}.exe
818+
path: apps/desktop/dist/nsis-web/Bitwarden-Beta-Installer-${{ env._PACKAGE_VERSION }}.exe
819+
if-no-files-found: error
820+
821+
- name: Upload appx ia32 artifact
822+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
823+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
824+
with:
825+
name: Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32.appx
826+
path: apps/desktop/dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32.appx
827+
if-no-files-found: error
828+
829+
- name: Upload store appx ia32 artifact
830+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
831+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
832+
with:
833+
name: Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32-store.appx
834+
path: apps/desktop/dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-ia32-store.appx
835+
if-no-files-found: error
836+
837+
- name: Upload NSIS ia32 artifact
838+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
839+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
840+
with:
841+
name: bitwarden-beta-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z
842+
path: apps/desktop/dist/nsis-web/bitwarden-beta-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z
843+
if-no-files-found: error
844+
845+
- name: Upload appx x64 artifact
846+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
847+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
848+
with:
849+
name: Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64.appx
850+
path: apps/desktop/dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64.appx
851+
if-no-files-found: error
852+
853+
- name: Upload store appx x64 artifact
854+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
855+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
856+
with:
857+
name: Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64-store.appx
858+
path: apps/desktop/dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-x64-store.appx
859+
if-no-files-found: error
860+
861+
- name: Upload NSIS x64 artifact
862+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
863+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
864+
with:
865+
name: bitwarden-beta-${{ env._PACKAGE_VERSION }}-x64.nsis.7z
866+
path: apps/desktop/dist/nsis-web/bitwarden-beta-${{ env._PACKAGE_VERSION }}-x64.nsis.7z
867+
if-no-files-found: error
868+
869+
- name: Upload appx ARM64 artifact
870+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
871+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
872+
with:
873+
name: Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64.appx
874+
path: apps/desktop/dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64.appx
875+
if-no-files-found: error
876+
877+
- name: Upload store appx ARM64 artifact
878+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
879+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
880+
with:
881+
name: Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64-store.appx
882+
path: apps/desktop/dist/Bitwarden-Beta-${{ env._PACKAGE_VERSION }}-arm64-store.appx
883+
if-no-files-found: error
884+
885+
- name: Upload NSIS ARM64 artifact
886+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
887+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
888+
with:
889+
name: bitwarden-beta-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z
890+
path: apps/desktop/dist/nsis-web/bitwarden-beta-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z
891+
if-no-files-found: error
892+
893+
- name: Upload auto-update artifact
894+
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
895+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
896+
with:
897+
name: ${{ needs.setup.outputs.release_channel }}-beta.yml
898+
path: apps/desktop/dist/nsis-web/${{ needs.setup.outputs.release_channel }}.yml
899+
if-no-files-found: error
900+
668901

669902
macos-build:
670903
name: MacOS Build
@@ -688,7 +921,7 @@ jobs:
688921
ref: ${{ github.event.pull_request.head.sha }}
689922

690923
- name: Set up Node
691-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
924+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
692925
with:
693926
cache: 'npm'
694927
cache-dependency-path: '**/package-lock.json'
@@ -914,7 +1147,7 @@ jobs:
9141147
ref: ${{ github.event.pull_request.head.sha }}
9151148

9161149
- name: Set up Node
917-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
1150+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
9181151
with:
9191152
cache: 'npm'
9201153
cache-dependency-path: '**/package-lock.json'
@@ -1172,7 +1405,7 @@ jobs:
11721405
ref: ${{ github.event.pull_request.head.sha }}
11731406

11741407
- name: Set up Node
1175-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
1408+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
11761409
with:
11771410
cache: 'npm'
11781411
cache-dependency-path: '**/package-lock.json'

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
5858
5959
- name: Set up Node
60-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
60+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6161
with:
6262
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}
6363
if: steps.get-changed-files-for-chromatic.outputs.storyFiles == 'true'

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
6262
6363
- name: Set up Node
64-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
64+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6565
with:
6666
cache: 'npm'
6767
cache-dependency-path: '**/package-lock.json'

.github/workflows/nx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
2626
2727
- name: Set up Node
28-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
28+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2929
with:
3030
cache: 'npm'
3131
cache-dependency-path: '**/package-lock.json'

.github/workflows/publish-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
206206
207207
- name: Set up Node
208-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
208+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
209209
with:
210210
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}
211211
npm-version: "11.5.1" # FIXME: npm 11.5.1 or later is required to publish w/ OIDC; move version management to somewhere maintainable by automation

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
3535
3636
- name: Set up Node
37-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
37+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3838
with:
3939
cache: 'npm'
4040
cache-dependency-path: '**/package-lock.json'

.storybook/format-args-for-code-snippet.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export const formatArgsForCodeSnippet = <ComponentType extends Record<string, an
2525
const formattedArray = value.map((v) => `'${v}'`).join(", ");
2626
return `[${key}]="[${formattedArray}]"`;
2727
}
28+
29+
if (typeof value === "number") {
30+
return `[${key}]="${value}"`;
31+
}
32+
2833
return `${key}="${value}"`;
2934
})
3035
.join(" ");

0 commit comments

Comments
 (0)