40
40
ext : " .exe"
41
41
- os : windows-2019
42
42
ext : " .exe"
43
- - os : macos-12
44
- arch : arm64
45
43
46
44
defaults :
47
45
run :
@@ -115,10 +113,8 @@ jobs:
115
113
MACOSX_DEPLOYMENT_TARGET : 10.15 # minimum supported version for mac
116
114
CGO_CFLAGS : -mmacosx-version-min=10.15
117
115
CGO_LDFLAGS : -mmacosx-version-min=10.15
118
- GOOS : " darwin"
119
- GOARCH : " amd64"
120
- run : task go:build
121
- if : matrix.os == 'macos-12' && matrix.arch == 'amd64'
116
+ run : task go:build-macos
117
+ if : matrix.os == 'macos-12'
122
118
123
119
- name : Build the Agent for macos arm64
124
120
env :
@@ -127,13 +123,26 @@ jobs:
127
123
CGO_CFLAGS : -mmacosx-version-min=10.15
128
124
CGO_LDFLAGS : -mmacosx-version-min=10.15
129
125
run : task go:build-macos-arm
130
- if : matrix.os == 'macos-12' && matrix.arch == 'arm64'
126
+ if : matrix.os == 'macos-12'
127
+
128
+ - name : Create universal macos executable
129
+ shell : zsh
130
+ run : lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64
131
+ if : matrix.os == 'macos-12'
131
132
132
133
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
133
134
- name : Create autoupdate files
134
135
run : go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
135
136
if : matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'
136
137
138
+ # for now we do not distribute m1 build, this is a workaround for now
139
+ - name : Copy autoupdate file for darwin-arm64 (m1 arch)
140
+ working-directory : public/
141
+ run : |
142
+ cp darwin-amd64.json darwin-arm64.json
143
+ cp ${TAG_VERSION}/darwin-amd64.gz ${TAG_VERSION}/darwin-arm64.gz
144
+ if : matrix.os == 'macos-12' && steps.prerelease.outputs.IS_PRE != 'true'
145
+
137
146
- name : Create autoupdate files for win32
138
147
run : go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
139
148
if : matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
@@ -181,7 +190,7 @@ jobs:
181
190
- name : Download artifact
182
191
uses : actions/download-artifact@v4
183
192
with :
184
- name : ${{ env.PROJECT_NAME }}-macos-12-${{ matrix.arch }}
193
+ name : ${{ env.PROJECT_NAME }}-macos-12-amd64 # if we want to support darwin-arm64 in the future for real this has to change.
185
194
path : ${{ env.EXE_PATH }}
186
195
187
196
- name : Remove placeholder file
0 commit comments