Skip to content

Commit bea1632

Browse files
authored
Merge pull request #99 from git-for-windows/windows-arm64-release
release-git: add support for arm64
2 parents 32b3e09 + 1cede4e commit bea1632

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

.github/actions/github-release/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ inputs:
3939
git_artifacts_x86_64_workflow_run_id:
4040
description: 'ID of the git-artifacts (x86_64) workflow run'
4141
required: true
42+
git_artifacts_aarch64_workflow_run_id:
43+
description: 'ID of the git-artifacts (aarch64) workflow run'
44+
required: true
4245
outputs:
4346
github-release-url:
4447
description: "The GitHub Release URL"
@@ -59,7 +62,7 @@ runs:
5962
rev: ${{ inputs.rev }}
6063
check-run-name: "github-release"
6164
title: "Publish ${{ inputs.display-version }} for @${{ inputs.rev }}"
62-
summary: "Downloading the Git artifacts from ${{ inputs.git_artifacts_x86_64_workflow_run_id }} and ${{ inputs.git_artifacts_i686_workflow_run_id }} and publishing them as a new GitHub Release at ${{ inputs.owner }}/${{ inputs.repo }}"
65+
summary: "Downloading the Git artifacts from ${{ inputs.git_artifacts_x86_64_workflow_run_id }}, ${{ inputs.git_artifacts_i686_workflow_run_id }} and ${{ inputs.git_artifacts_aarch64_workflow_run_id }} and publishing them as a new GitHub Release at ${{ inputs.owner }}/${{ inputs.repo }}"
6366
text: "For details, see [this run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id}})."
6467
details-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id}}"
6568
- name: Download bundle-artifacts (needed to push the tag)
@@ -97,7 +100,8 @@ runs:
97100
artifactsOwner,
98101
artifactsRepo,
99102
${{ inputs.git_artifacts_i686_workflow_run_id }},
100-
${{ inputs.git_artifacts_x86_64_workflow_run_id }}
103+
${{ inputs.git_artifacts_x86_64_workflow_run_id }},
104+
${{ inputs.git_artifacts_aarch64_workflow_run_id }}
101105
)
102106
103107
const sha256sums = sha256sumsFromReleaseNotes(${{ toJSON(inputs.release-notes) }})

.github/workflows/release-git.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
git_artifacts_x86_64_workflow_run_id:
1010
description: 'ID of the git-artifacts (x86_64) workflow run'
1111
required: true
12+
git_artifacts_aarch64_workflow_run_id:
13+
description: 'ID of the git-artifacts (aarch64) workflow run'
14+
required: true
1215

1316
env:
1417
HOME: "${{github.workspace}}\\home"
@@ -17,6 +20,7 @@ env:
1720
REPO: git
1821
I686_WORKFLOW_RUN_ID: "${{github.event.inputs.git_artifacts_i686_workflow_run_id}}"
1922
X86_64_WORKFLOW_RUN_ID: "${{github.event.inputs.git_artifacts_x86_64_workflow_run_id}}"
23+
AARCH64_WORKFLOW_RUN_ID: "${{github.event.inputs.git_artifacts_aarch64_workflow_run_id}}"
2024

2125
jobs:
2226
setup:
@@ -86,7 +90,8 @@ jobs:
8690
context.repo.owner,
8791
context.repo.repo,
8892
process.env.I686_WORKFLOW_RUN_ID,
89-
process.env.X86_64_WORKFLOW_RUN_ID
93+
process.env.X86_64_WORKFLOW_RUN_ID,
94+
process.env.AARCH64_WORKFLOW_RUN_ID
9095
)
9196
9297
core.setOutput('display-version', result.displayVersion)

github-release.js

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ const downloadAndUnZip = async (token, url, name) => {
7373

7474
const architectures = [
7575
{ name: 'x86_64', infix: '-64-bit' },
76-
{ name: 'i686', infix: '-32-bit' }
76+
{ name: 'i686', infix: '-32-bit' },
77+
{ name: 'aarch64', infix: '-arm64' }
7778
]
7879

7980
const artifacts = [
@@ -96,11 +97,20 @@ const artifactName2Rank = (name) => {
9697
return rank
9798
}
9899

99-
const downloadBundleArtifacts = async (context, token, owner, repo, git_artifacts_i686_workflow_run_id, git_artifacts_x86_64_workflow_run_id) => {
100+
const downloadBundleArtifacts = async (
101+
context,
102+
token,
103+
owner,
104+
repo,
105+
git_artifacts_i686_workflow_run_id,
106+
git_artifacts_x86_64_workflow_run_id,
107+
git_artifacts_aarch64_workflow_run_id
108+
) => {
100109
for (const architecture of architectures) {
101110
const workflowRunId = {
102111
x86_64: git_artifacts_x86_64_workflow_run_id,
103-
i686: git_artifacts_i686_workflow_run_id
112+
i686: git_artifacts_i686_workflow_run_id,
113+
aarch64: git_artifacts_aarch64_workflow_run_id
104114
}[architecture.name]
105115
const downloadURLs = await getWorkflowRunArtifactsURLs(context, token, owner, repo, workflowRunId)
106116
if (architecture.name === 'x86_64') await downloadAndUnZip(token, downloadURLs['bundle-artifacts'], 'bundle-artifacts')
@@ -162,17 +172,27 @@ const downloadBundleArtifacts = async (context, token, owner, repo, git_artifact
162172
return result
163173
}
164174

165-
const getGitArtifacts = async (context, token, owner, repo, git_artifacts_i686_workflow_run_id, git_artifacts_x86_64_workflow_run_id) => {
175+
const getGitArtifacts = async (
176+
context,
177+
token,
178+
owner,
179+
repo,
180+
git_artifacts_i686_workflow_run_id,
181+
git_artifacts_x86_64_workflow_run_id,
182+
git_artifacts_aarch64_workflow_run_id
183+
) => {
166184
const fs = require('fs')
167185
const result = []
168186
for (const architecture of architectures) {
169187
const workflowRunId = {
170188
x86_64: git_artifacts_x86_64_workflow_run_id,
171-
i686: git_artifacts_i686_workflow_run_id
189+
i686: git_artifacts_i686_workflow_run_id,
190+
aarch64: git_artifacts_aarch64_workflow_run_id
172191
}[architecture.name]
173192

174193
const urls = await getWorkflowRunArtifactsURLs(context, token, owner, repo, workflowRunId)
175194
for (const artifact of artifacts) {
195+
if (architecture.name === 'aarch64' && artifact.name === 'mingit-busybox') continue
176196
const name = `${artifact.name}-${architecture.name}`
177197
context.log(`Downloading ${name}`)
178198
await downloadAndUnZip(token, urls[name], name)

0 commit comments

Comments
 (0)