Skip to content

Commit b43bd1e

Browse files
committed
Added Windows ARM64 build support
1 parent 36b4302 commit b43bd1e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

workflow-templates/assets/release-go-task/DistTasks.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,32 @@ tasks:
7474
PACKAGE_PLATFORM: "Windows_64bit"
7575
PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.zip"
7676

77+
Windows_ARM64:
78+
desc: Builds Windows ARM64 binaries
79+
dir: "{{.DIST_DIR}}"
80+
cmds:
81+
- |
82+
docker run \
83+
-v `pwd`/..:/home/build \
84+
-w /home/build \
85+
-e CGO_ENABLED=1 \
86+
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
87+
--build-cmd "{{.BUILD_COMMAND}}" \
88+
-p "{{.BUILD_PLATFORM}}"
89+
90+
zip \
91+
{{.PACKAGE_NAME}} \
92+
{{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe ../LICENSE.txt \
93+
-j
94+
95+
vars:
96+
PLATFORM_DIR: "{{.PROJECT_NAME}}_windows_arm64"
97+
BUILD_COMMAND: "go build -buildvcs=false -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe {{.LDFLAGS}}"
98+
BUILD_PLATFORM: "windows/arm64"
99+
CONTAINER_TAG: "{{.GO_VERSION}}-windows-arm64-debian12"
100+
PACKAGE_PLATFORM: "Windows_ARM64"
101+
PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.zip"
102+
77103
Linux_32bit:
78104
desc: Builds Linux 32 bit binaries
79105
dir: "{{.DIST_DIR}}"

workflow-templates/release-go-task.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
artifact-suffix: Windows_32bit
3131
- task: Windows_64bit
3232
artifact-suffix: Windows_64bit
33+
- task: Windows_ARM64
34+
artifact-suffix: Windows_ARM64
3335
- task: Linux_32bit
3436
artifact-suffix: Linux_32bit
3537
- task: Linux_64bit

0 commit comments

Comments
 (0)