Skip to content

Commit

Permalink
Support for darwin+linux arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevsaddam committed Nov 3, 2021
1 parent 35f1188 commit 657afe6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ jobs:
asset_path: bin/mac_amd64
asset_name: mac_amd64
asset_content_type: application/octet-stream
- name: upload darwin_arm64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/mac_arm64
asset_name: mac_arm64
asset_content_type: application/octet-stream
- name: upload linux_amd64 binary
uses: actions/upload-release-asset@v1
env:
Expand All @@ -47,6 +56,15 @@ jobs:
asset_path: bin/linux_amd64
asset_name: linux_amd64
asset_content_type: application/octet-stream
- name: upload linux_arm64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/linux_arm64
asset_name: linux_arm64
asset_content_type: application/octet-stream
- name: upload linux_386 binary
uses: actions/upload-release-asset@v1
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ dl
.coverage.txt
bin/linux_386
bin/linux_amd64
bin/linux_arm64
bin/mac_amd64
bin/mac_arm64
bin/windows_386.exe
bin/windows_amd64.exe
file_example_MP3_700KB.mp3
Expand Down
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,22 @@ export GOOS="darwin"
export CGO_ENABLED=0
go build -ldflags "-X github.com/thedevsaddam/dl/cmd.GitCommit=$GIT_COMMIT -X github.com/thedevsaddam/dl/cmd.Version=$TAG -X github.com/thedevsaddam/dl/cmd.BuildDate=$DATE" -o bin/mac_amd64 -v .

export GOARCH="arm64"
export GOOS="darwin"
export CGO_ENABLED=0
go build -ldflags "-X github.com/thedevsaddam/dl/cmd.GitCommit=$GIT_COMMIT -X github.com/thedevsaddam/dl/cmd.Version=$TAG -X github.com/thedevsaddam/dl/cmd.BuildDate=$DATE" -o bin/mac_arm64 -v .

#LINUX
export GOARCH="amd64"
export GOOS="linux"
export CGO_ENABLED=0
go build -ldflags "-X github.com/thedevsaddam/dl/cmd.GitCommit=$GIT_COMMIT -X github.com/thedevsaddam/dl/cmd.Version=$TAG -X github.com/thedevsaddam/dl/cmd.BuildDate=$DATE" -o bin/linux_amd64 -v

export GOARCH="arm64"
export GOOS="linux"
export CGO_ENABLED=0
go build -ldflags "-X github.com/thedevsaddam/dl/cmd.GitCommit=$GIT_COMMIT -X github.com/thedevsaddam/dl/cmd.Version=$TAG -X github.com/thedevsaddam/dl/cmd.BuildDate=$DATE" -o bin/linux_arm64 -v

export GOARCH="386"
export GOOS="linux"
export CGO_ENABLED=0
Expand Down
4 changes: 2 additions & 2 deletions notifier/asset.go

Large diffs are not rendered by default.

0 comments on commit 657afe6

Please sign in to comment.