|
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,25 +113,29 @@ 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: | |
| 117 | + task go:build |
| 118 | + mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 |
| 119 | + if: matrix.os == 'macos-12' |
122 | 120 |
|
123 |
| - - name: Build the Agent for macos arm64 |
124 |
| - env: |
125 |
| - CGO_ENABLED: 1 |
126 |
| - MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac |
127 |
| - CGO_CFLAGS: -mmacosx-version-min=10.15 |
128 |
| - CGO_LDFLAGS: -mmacosx-version-min=10.15 |
129 |
| - run: task go:build-macos-arm |
130 |
| - if: matrix.os == 'macos-12' && matrix.arch == 'arm64' |
| 121 | + - name: Create universal macos executable |
| 122 | + shell: zsh |
| 123 | + run: lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 |
| 124 | + if: matrix.os == 'macos-12' |
131 | 125 |
|
132 | 126 | # this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
|
133 | 127 | - name: Create autoupdate files
|
134 | 128 | run: go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
|
135 | 129 | if: matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'
|
136 | 130 |
|
| 131 | + # for now we do not distribute m1 build, this is a workaround for now |
| 132 | + - name: Copy autoupdate file for darwin-arm64 (m1 arch) |
| 133 | + working-directory: public/ |
| 134 | + run: | |
| 135 | + cp darwin-amd64.json darwin-arm64.json |
| 136 | + cp ${TAG_VERSION}/darwin-amd64.gz ${TAG_VERSION}/darwin-arm64.gz |
| 137 | + if: matrix.os == 'macos-12' && steps.prerelease.outputs.IS_PRE != 'true' |
| 138 | + |
137 | 139 | - name: Create autoupdate files for win32
|
138 | 140 | run: go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
|
139 | 141 | if: matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
|
@@ -181,7 +183,7 @@ jobs:
|
181 | 183 | - name: Download artifact
|
182 | 184 | uses: actions/download-artifact@v4
|
183 | 185 | with:
|
184 |
| - name: ${{ env.PROJECT_NAME }}-macos-12-${{ matrix.arch }} |
| 186 | + name: ${{ env.PROJECT_NAME }}-macos-12-amd64 # if we want to support darwin-arm64 in the future for real this has to change. |
185 | 187 | path: ${{ env.EXE_PATH }}
|
186 | 188 |
|
187 | 189 | - name: Remove placeholder file
|
|
0 commit comments