Skip to content

Commit

Permalink
Merge pull request #11 from oliver-hohn/build-mac-binary
Browse files Browse the repository at this point in the history
Build mac binary
  • Loading branch information
oliver-hohn authored Dec 25, 2020
2 parents d8568d9 + 6b78509 commit 869a68d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ jobs:
dep ensure
fi
- name: Build
run: go build -v -o=bin ./...
- name: Build for Linux
run: go build -v -o=bin/linux ./...

- name: Build for Mac
run: GOOS=darwin GOARCH=amd64 go build -v -o=bin/mac ./...

- name: Get current date time
id: current_datetime
Expand All @@ -38,20 +41,29 @@ jobs:
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{env.NOW}}.${{github.run_number }}
RELEASE_NAME: ${{ env.NOW }}.${{ github.run_number }}
with:
tag_name: ${{ env.RELEASE_NAME }}
release_name: Release ${{ env.RELEASE_NAME }}
draft: false
prerelease: false

- name: Upload "Organize my files, Woodhouse!"
id: upload-release-asset-organizemyfiles
- name: Upload "Organize my files, Woodhouse!" for Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/linux/organizemyfiles
asset_name: organizemyfiles.linux.bin
asset_content_type: application/octet-stream

- name: Upload "Organize my files, Woodhouse!" for Mac
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/organizemyfiles
asset_name: organizemyfiles.bin
asset_path: ./bin/mac/organizemyfiles
asset_name: organizemyfiles.mac.bin
asset_content_type: application/octet-stream
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bin/*
!bin/.keep
bin/*/*
!bin/*/.keep
Empty file added bin/linux/.keep
Empty file.
Empty file added bin/mac/.keep
Empty file.

0 comments on commit 869a68d

Please sign in to comment.