@@ -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'
0 commit comments