Skip to content

Commit 38f015a

Browse files
ci(npm): Release Windows ARM build to npm (#2436)
Allows Windows on ARM users installing Sentry CLI from `npm` to use the native build, added in #2429
1 parent 987e933 commit 38f015a

File tree

8 files changed

+41
-7
lines changed

8 files changed

+41
-7
lines changed

.craft.yml

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ targets:
3434
- name: npm
3535
id: '@sentry/cli-win32-x64'
3636
includeNames: /^sentry-cli-win32-x64-\d.*\.tgz$/
37+
- name: npm
38+
id: '@sentry/cli-win32-arm64'
39+
includeNames: /^sentry-cli-win32-arm64-\d.*\.tgz$/
3740

3841
# Main Sentry CLI package
3942
- name: npm
@@ -113,5 +116,6 @@ requireNames:
113116
- /^sentry-cli-Linux-aarch64$/
114117
- /^sentry-cli-Windows-i686.exe$/
115118
- /^sentry-cli-Windows-x86_64.exe$/
119+
- /^sentry-cli-Windows-aarch64.exe$/
116120
- /^sentry_cli-.*.tar.gz$/
117121
- /^sentry_cli-.*.whl$/

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ jobs:
300300
mv binary-artifacts/sentry-cli-Linux-x86_64 npm-binary-distributions/linux-x64/bin/sentry-cli
301301
mv binary-artifacts/sentry-cli-Windows-i686.exe npm-binary-distributions/win32-i686/bin/sentry-cli.exe
302302
mv binary-artifacts/sentry-cli-Windows-x86_64.exe npm-binary-distributions/win32-x64/bin/sentry-cli.exe
303+
mv binary-artifacts/sentry-cli-Windows-aarch64.exe npm-binary-distributions/win32-arm64/bin/sentry-cli.exe
303304
- name: Remove binary placeholders
304305
run: rm -rf npm-binary-distributions/*/bin/.gitkeep
305306
- name: Make Linux binaries executable

js/helper.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const BINARY_DISTRIBUTIONS = [
1313
{ packageName: '@sentry/cli-linux-arm', subpath: 'bin/sentry-cli' },
1414
{ packageName: '@sentry/cli-win32-x64', subpath: 'bin/sentry-cli.exe' },
1515
{ packageName: '@sentry/cli-win32-i686', subpath: 'bin/sentry-cli.exe' },
16+
{ packageName: '@sentry/cli-win32-arm64', subpath: 'bin/sentry-cli.exe' },
1617
];
1718

1819
/**
@@ -58,14 +59,15 @@ function getDistributionForThisPlatform() {
5859
} else if (platform === 'win32') {
5960
switch (arch) {
6061
case 'x64':
61-
// Windows arm64 can run x64 binaries
62-
case 'arm64':
6362
packageName = '@sentry/cli-win32-x64';
6463
break;
6564
case 'x86':
6665
case 'ia32':
6766
packageName = '@sentry/cli-win32-i686';
6867
break;
68+
case 'arm64':
69+
packageName = '@sentry/cli-win32-arm64';
70+
break;
6971
}
7072
}
7173

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<p align="center">
2+
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
4+
</a>
5+
</p>
6+
7+
# Sentry CLI Windows ARM64 Binary
8+
9+
This package contains the Sentry CLI binary for Windows ARM64.
10+
11+
See https://github.com/getsentry/sentry-cli for more information.

npm-binary-distributions/win32-arm64/bin/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "@sentry/cli-win32-arm64",
3+
"version": "2.42.4",
4+
"description": "The windows arm64 distribution of the Sentry CLI binary.",
5+
"repository": "https://github.com/getsentry/sentry-cli",
6+
"license": "BSD-3-Clause",
7+
"publishConfig": {
8+
"access": "public"
9+
},
10+
"engines": {
11+
"node": ">=10"
12+
},
13+
"os": [
14+
"win32"
15+
],
16+
"cpu": [
17+
"arm64"
18+
]
19+
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"@sentry/cli-linux-i686": "2.42.4",
3737
"@sentry/cli-linux-x64": "2.42.4",
3838
"@sentry/cli-win32-i686": "2.42.4",
39-
"@sentry/cli-win32-x64": "2.42.4"
39+
"@sentry/cli-win32-x64": "2.42.4",
40+
"@sentry/cli-win32-arm64": "2.42.4"
4041
},
4142
"scripts": {
4243
"postinstall": "node ./scripts/install.js",

scripts/install.js

-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ function getDownloadUrl(platform, arch) {
7878
case 'darwin':
7979
return `${releasesUrl}-Darwin-universal`;
8080
case 'win32':
81-
// Windows arm machines can run x64 binaries
82-
if (arch === 'arm64') {
83-
archString = 'x86_64';
84-
}
8581
return `${releasesUrl}-Windows-${archString}.exe`;
8682
case 'linux':
8783
case 'freebsd':

0 commit comments

Comments
 (0)