Skip to content

Commit 56afb4f

Browse files
author
ardalan
committed
modifying build-release-artifact.yml by adding the archs amd64, arm6 to make the exe file working with latest macbook
1 parent e65c524 commit 56afb4f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build-release-artifact.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [linux, darwin, windows]
12+
goarch: [amd64, arm64]
13+
1214
steps:
1315
- name: Checkout code
1416
uses: actions/checkout@v2
@@ -21,9 +23,9 @@ jobs:
2123
- name: Build Go binaries
2224
run: |
2325
if [ ${{ matrix.os }} == "windows" ]; then
24-
CGO_ENABLED=0 GOOS=${{ matrix.os }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile.exe .
26+
CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile.exe .
2527
else
26-
CGO_ENABLED=0 GOOS=${{ matrix.os }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile .
28+
CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile .
2729
fi
2830
2931
- name: Extract release version from branch name
@@ -33,7 +35,7 @@ jobs:
3335
- name: Create artifact
3436
uses: actions/upload-artifact@v2
3537
with:
36-
name: tf-profile-v${{ steps.release_version.outputs.version }}-${{ matrix.os }}
38+
name: tf-profile-v${{ steps.release_version.outputs.version }}-${{ matrix.os }}-${{ matrix.arch }}
3739
path: |
3840
./tf-profile
3941
./tf-profile.exe

0 commit comments

Comments
 (0)