Skip to content

Commit

Permalink
add macos in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zakaria-chahboun committed Oct 18, 2022
1 parent ec295a1 commit 2c18eb5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,14 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/tarjem-${{ github.ref_name }}-windows-amd64.exe
asset_name: tarjem-${{ github.ref_name }}-windows-amd64.exe
asset_content_type: application/x-ms-dos-executable
asset_content_type: application/x-ms-dos-executable

- name: Upload Macos assests
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/tarjem-${{ github.ref_name }}-macos-amd64.exe
asset_name: tarjem-${{ github.ref_name }}-macos-amd64.exe
asset_content_type: application/x-executable
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ build:
compile:
echo "Compiling for every OS and Platform"

GOOS=freebsd GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-freebsd-amd64 main.go
GOOS=linux GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-linux-amd64 main.go
GOOS=windows GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-windows-amd64.exe main.go
GOOS=freebsd GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-freebsd-amd64 .
GOOS=linux GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-linux-amd64 .
GOOS=windows GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-windows-amd64.exe .
GOOS=darwin GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-macos-amd64 .

clean:
rm -f ./$(name)
Expand Down
7 changes: 4 additions & 3 deletions Makefile.actions
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ install:
build:
echo "Compiling for every OS and Platform"

GOOS=freebsd GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-freebsd-amd64 main.go
GOOS=linux GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-linux-amd64 main.go
GOOS=windows GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-windows-amd64.exe main.go
GOOS=freebsd GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-freebsd-amd64 .
GOOS=linux GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-linux-amd64 .
GOOS=windows GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-windows-amd64.exe .
GOOS=darwin GOARCH=amd64 go build $(inject_version) -o bin/$(appname)-macos-amd64 .

clean:
rm -f -R bin

0 comments on commit 2c18eb5

Please sign in to comment.