Skip to content

Commit 48596d1

Browse files
committed
slash-commands: support arm64 in release command
We're already building arm64 artifacts, so let's add support for arm64 to the release pipeline as well. Note: this needs the workflow to support the git_artifacts_aarch64_workflow_run_id input as well. Signed-off-by: Dennis Ameling <[email protected]>
1 parent c4475aa commit 48596d1

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

GitForWindowsHelper/slash-commands.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ module.exports = async (context, req) => {
400400
let gitVersion
401401
let tagGitWorkflowRunID
402402
const workFlowRunIDs = {}
403-
for (const architecture of ['x86_64', 'i686']) {
403+
for (const architecture of ['x86_64', 'i686', 'aarch64']) {
404404
const workflowName = `git-artifacts-${architecture}`
405405
const runs = await listCheckRunsForCommit(
406406
context,
@@ -447,7 +447,7 @@ module.exports = async (context, req) => {
447447
releaseCheckRunId, {
448448
output: {
449449
title: `Publish ${gitVersion} for @${commitSHA}`,
450-
summary: `Downloading the Git artifacts from ${workFlowRunIDs['x86_64']} and ${workFlowRunIDs['i686']} and publishing them as a new GitHub Release at ${owner}/${repo}`
450+
summary: `Downloading the Git artifacts from ${workFlowRunIDs['x86_64']}, ${workFlowRunIDs['i686']} and ${workFlowRunIDs['aarch64']} and publishing them as a new GitHub Release at ${owner}/${repo}`
451451
}
452452
}
453453
)
@@ -461,7 +461,8 @@ module.exports = async (context, req) => {
461461
'release-git.yml',
462462
'main', {
463463
git_artifacts_x86_64_workflow_run_id: workFlowRunIDs['x86_64'],
464-
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686']
464+
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686'],
465+
git_artifacts_aarch64_workflow_run_id: workFlowRunIDs['aarch64'],
465466
}
466467
)
467468

__tests__/index.test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,11 @@ let mockQueueCheckRun = jest.fn(() => 'check-run-id')
413413
let mockUpdateCheckRun = jest.fn()
414414
let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev, checkRunName) => {
415415
if (rev === 'this-will-be-rc2') {
416-
const id = checkRunName === 'git-artifacts-x86_64' ? 8664 : 686
416+
const id = {
417+
'git-artifacts-x86_64': 8664,
418+
'git-artifacts-i686': 686,
419+
'git-artifacts-aarch64': 64
420+
}[checkRunName]
417421
const output = {
418422
title: 'Build Git -rc2 artifacts',
419423
summary: 'Build Git -rc2 artifacts from commit this-will-be-rc2 (tag-git run #987)',
@@ -861,7 +865,8 @@ The \`release-git\` workflow run [was started](dispatched-workflow-release-git.y
861865
expect(dispatchedWorkflows[0].html_url).toEqual('dispatched-workflow-release-git.yml')
862866
expect(dispatchedWorkflows[0].payload.inputs).toEqual({
863867
git_artifacts_x86_64_workflow_run_id: "8664",
864-
git_artifacts_i686_workflow_run_id: "686"
868+
git_artifacts_i686_workflow_run_id: "686",
869+
git_artifacts_aarch64_workflow_run_id: "64"
865870
})
866871
})
867872

0 commit comments

Comments
 (0)