Skip to content

Commit

Permalink
modifying build-release-artifact.yml by adding the archs amd64, arm6 …
Browse files Browse the repository at this point in the history
…to make the exe file working with latest macbook
  • Loading branch information
ardalan committed May 23, 2023
1 parent e65c524 commit 56afb4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-release-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
strategy:
matrix:
os: [linux, darwin, windows]
goarch: [amd64, arm64]

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -21,9 +23,9 @@ jobs:
- name: Build Go binaries
run: |
if [ ${{ matrix.os }} == "windows" ]; then
CGO_ENABLED=0 GOOS=${{ matrix.os }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile.exe .
CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile.exe .
else
CGO_ENABLED=0 GOOS=${{ matrix.os }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile .
CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o tf-profile .
fi
- name: Extract release version from branch name
Expand All @@ -33,7 +35,7 @@ jobs:
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: tf-profile-v${{ steps.release_version.outputs.version }}-${{ matrix.os }}
name: tf-profile-v${{ steps.release_version.outputs.version }}-${{ matrix.os }}-${{ matrix.arch }}
path: |
./tf-profile
./tf-profile.exe

0 comments on commit 56afb4f

Please sign in to comment.