Skip to content

Commit 7e2a221

Browse files
committed
Add support for macos-13-arm64 GitHub runners
1 parent 3fca867 commit 7e2a221

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ const GitHubHostedPlatforms = [
168168
'macos-11-x64',
169169
'macos-12-x64',
170170
'macos-13-x64',
171+
'macos-13-arm64',
171172
'windows-2019-x64',
172173
'windows-2022-x64',
173174
]
@@ -243,7 +244,7 @@ export function getToolCachePath() {
243244
return getRunnerToolCache()
244245
} else {
245246
// Rubies prebuilt by this action embed this path rather than using $RUNNER_TOOL_CACHE
246-
// so use that path is not isSelfHostedRunner()
247+
// so use that path if not isSelfHostedRunner()
247248
return getDefaultToolCachePath()
248249
}
249250
}

dist/index.js

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ruby-builder.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,14 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
101101

102102
function getDownloadURL(platform, engine, version) {
103103
let builderPlatform = platform
104-
if (platform.startsWith('windows-')) {
104+
if (platform.startsWith('windows-') && os.arch() === 'x64') {
105105
builderPlatform = 'windows-latest'
106106
} else if (platform.startsWith('macos-')) {
107-
builderPlatform = 'macos-latest'
107+
if (os.arch() === 'x64') {
108+
builderPlatform = 'macos-latest'
109+
} else if (os.arch() === 'arm64') {
110+
builderPlatform = 'macos-13-arm64'
111+
}
108112
}
109113

110114
if (common.isHeadVersion(version)) {

0 commit comments

Comments
 (0)