Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: support M1/M2 CPU on Mac arm64 #142

Merged
merged 4 commits into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ jobs:
zip -j dist/macos-amd64.zip dist/2ms
rm dist/2ms

- name: Compile for MacOS arm64
env:
VERSION: ${{ needs.test.outputs.version }}
CGO_ENABLED: 0
GOOS: darwin
GOARCH: arm64
run: |
go build -ldflags "-s -w -X github.com/checkmarx/2ms/cmd.Version=$VERSION" -a -installsuffix cgo -o dist/2ms main.go
zip -j dist/macos-arm64.zip dist/2ms
rm dist/2ms

- name: Compile for Windows amd64
env:
VERSION: ${{ needs.test.outputs.version }}
Expand Down Expand Up @@ -106,6 +117,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
checkmarx/2ms:latest
Expand Down