mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[PM-10105] Release arm64 binaries for macOS (#10273)
* ci(mac): add step to build and release macos arm64 binary * ci(mac): add step to build and release macos arm64 binary * fix: add target_suffix to build & package command
This commit is contained in:
27
.github/workflows/build-cli.yml
vendored
27
.github/workflows/build-cli.yml
vendored
@@ -77,13 +77,14 @@ jobs:
|
|||||||
echo "has_secrets=$has_secrets" >> $GITHUB_OUTPUT
|
echo "has_secrets=$has_secrets" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
cli:
|
cli:
|
||||||
name: CLI ${{ matrix.os.base }} - ${{ matrix.license_type.readable }}
|
name: CLI ${{ matrix.os.base }}${{ matrix.os.target_suffix }} - ${{ matrix.license_type.readable }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
[
|
[
|
||||||
{ base: "linux", distro: "ubuntu-22.04" },
|
{ base: "linux", distro: "ubuntu-22.04", target_suffix: "" },
|
||||||
{ base: "mac", distro: "macos-13" }
|
{ base: "mac", distro: "macos-13", target_suffix: "" },
|
||||||
|
{ base: "mac", distro: "macos-14", target_suffix: "-arm64" }
|
||||||
]
|
]
|
||||||
license_type:
|
license_type:
|
||||||
[
|
[
|
||||||
@@ -142,16 +143,16 @@ jobs:
|
|||||||
npm link ../sdk-internal
|
npm link ../sdk-internal
|
||||||
|
|
||||||
- name: Build & Package Unix
|
- name: Build & Package Unix
|
||||||
run: npm run dist:${{ matrix.license_type.build_prefix }}:${{ env.SHORT_RUNNER_OS }} --quiet
|
run: npm run dist:${{ matrix.license_type.build_prefix }}:${{ env.SHORT_RUNNER_OS }}${{ matrix.os.target_suffix }} --quiet
|
||||||
|
|
||||||
- name: Zip Unix
|
- name: Zip Unix
|
||||||
run: |
|
run: |
|
||||||
cd ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }}
|
cd ./dist/${{ matrix.license_type.build_prefix }}/${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}
|
||||||
zip ../../bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip ./bw
|
zip ../../bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}-${{ env._PACKAGE_VERSION }}.zip ./bw
|
||||||
|
|
||||||
- name: Version Test
|
- name: Version Test
|
||||||
run: |
|
run: |
|
||||||
unzip "./dist/bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip" -d "./test"
|
unzip "./dist/bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}-${{ env._PACKAGE_VERSION }}.zip" -d "./test"
|
||||||
testVersion=$(./test/bw -v)
|
testVersion=$(./test/bw -v)
|
||||||
echo "version: $_PACKAGE_VERSION"
|
echo "version: $_PACKAGE_VERSION"
|
||||||
echo "testVersion: $testVersion"
|
echo "testVersion: $testVersion"
|
||||||
@@ -163,22 +164,22 @@ jobs:
|
|||||||
- name: Create checksums Unix
|
- name: Create checksums Unix
|
||||||
run: |
|
run: |
|
||||||
cd ./dist
|
cd ./dist
|
||||||
shasum -a 256 bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip \
|
shasum -a 256 bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}-${{ env._PACKAGE_VERSION }}.zip \
|
||||||
| awk '{split($0, a); print a[1]}' > bw${{
|
| awk '{split($0, a); print a[1]}' > bw${{
|
||||||
matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
|
|
||||||
- name: Upload unix zip asset
|
- name: Upload unix zip asset
|
||||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
||||||
with:
|
with:
|
||||||
name: bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-${{ env._PACKAGE_VERSION }}.zip
|
name: bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}-${{ env._PACKAGE_VERSION }}.zip
|
||||||
path: apps/cli/dist/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 }}${{ matrix.os.target_suffix }}-${{ env._PACKAGE_VERSION }}.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload unix checksum asset
|
- name: Upload unix checksum asset
|
||||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
||||||
with:
|
with:
|
||||||
name: bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
name: bw${{ matrix.license_type.artifact_prefix }}-${{ env.LOWER_RUNNER_OS }}${{ matrix.os.target_suffix }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
path: apps/cli/dist/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 }}${{ matrix.os.target_suffix }}-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
cli-windows:
|
cli-windows:
|
||||||
|
|||||||
@@ -32,15 +32,19 @@
|
|||||||
"build:bit:prod:watch": "cross-env NODE_ENV=production npm run build:bit:watch",
|
"build:bit:prod:watch": "cross-env NODE_ENV=production npm run build:bit:watch",
|
||||||
"dist:oss:win": "npm run build:oss:prod && npm run clean && npm run package:oss:win",
|
"dist:oss:win": "npm run build:oss:prod && npm run clean && npm run package:oss:win",
|
||||||
"dist:oss:mac": "npm run build:oss:prod && npm run clean && npm run package:oss:mac",
|
"dist:oss:mac": "npm run build:oss:prod && npm run clean && npm run package:oss:mac",
|
||||||
|
"dist:oss:mac-arm64": "npm run build:oss:prod && npm run clean && npm run package:oss:mac-arm64",
|
||||||
"dist:oss:lin": "npm run build:oss:prod && npm run clean && npm run package:oss:lin",
|
"dist:oss:lin": "npm run build:oss:prod && npm run clean && npm run package:oss:lin",
|
||||||
"dist:bit:win": "npm run build:bit:prod && npm run clean && npm run package:bit:win",
|
"dist:bit:win": "npm run build:bit:prod && npm run clean && npm run package:bit:win",
|
||||||
"dist:bit:mac": "npm run build:bit:prod && npm run clean && npm run package:bit:mac",
|
"dist:bit:mac": "npm run build:bit:prod && npm run clean && npm run package:bit:mac",
|
||||||
|
"dist:bit:mac-arm64": "npm run build:bit:prod && npm run clean && npm run package:bit:mac-arm64",
|
||||||
"dist:bit:lin": "npm run build:bit:prod && npm run clean && npm run package:bit:lin",
|
"dist:bit:lin": "npm run build:bit:prod && npm run clean && npm run package:bit:lin",
|
||||||
"package:oss:win": "pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe",
|
"package:oss:win": "pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe",
|
||||||
"package:oss:mac": "pkg . --targets macos-x64 --output ./dist/oss/macos/bw",
|
"package:oss:mac": "pkg . --targets macos-x64 --output ./dist/oss/macos/bw",
|
||||||
|
"package:oss:mac-arm64": "pkg . --targets macos-arm64 --output ./dist/oss/macos-arm64/bw",
|
||||||
"package:oss:lin": "pkg . --targets linux-x64 --output ./dist/oss/linux/bw",
|
"package:oss:lin": "pkg . --targets linux-x64 --output ./dist/oss/linux/bw",
|
||||||
"package:bit:win": "pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe",
|
"package:bit:win": "pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe",
|
||||||
"package:bit:mac": "pkg . --targets macos-x64 --output ./dist/bit/macos/bw",
|
"package:bit:mac": "pkg . --targets macos-x64 --output ./dist/bit/macos/bw",
|
||||||
|
"package:bit:mac-arm64": "pkg . --targets macos-arm64 --output ./dist/bit/macos-arm64/bw",
|
||||||
"package:bit:lin": "pkg . --targets linux-x64 --output ./dist/bit/linux/bw",
|
"package:bit:lin": "pkg . --targets linux-x64 --output ./dist/bit/linux/bw",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
|
|||||||
Reference in New Issue
Block a user