Skip to content

Commit

Permalink
build: support Linux ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanars committed Feb 2, 2024
1 parent 88fa06f commit 53d3a36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
files: 'hack/switch/switcher_linux_amd64'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.build_binary_files.outputs.latest_release_filtered_tag }}
- name: Upload Linux (ARM) binaries to release
uses: AButler/upload-release-assets@v2.0
with:
files: 'hack/switch/switcher_linux_arm64'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.build_binary_files.outputs.latest_release_filtered_tag }}
- name: Upload switch script to release
uses: AButler/upload-release-assets@v2.0
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ hack/tools/bin/

/hack/switch/switcher_linux_amd64
/hack/switch/switcher_linux_amd64.tar.gz

/hack/switch/switcher_linux_arm64
/hack/switch/switcher_linux_arm64.tar.gz
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ build: build-switcher
.PHONY: build-switcher
build-switcher:
@env GOOS=linux GOARCH=amd64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_linux_amd64 ./cmd/main.go
@env GOOS=linux GOARCH=arm64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_linux_arm64 ./cmd/main.go
@env GOOS=darwin GOARCH=amd64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_darwin_amd64 ./cmd/main.go
@env GOOS=darwin GOARCH=arm64 go build -ldflags "-w -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${VERSION} -X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=${DATE}" -o hack/switch/switcher_darwin_arm64 ./cmd/main.go

Expand Down

0 comments on commit 53d3a36

Please sign in to comment.