Skip to content

Commit

Permalink
Build woodhouse for both Intel and M1 OS
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-hohn committed Mar 25, 2023
1 parent a47ec4f commit 10ace8f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.20

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -29,8 +29,11 @@ jobs:
- 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: Build for Mac Intel
run: GOOS=darwin GOARCH=amd64 go build -v -o=bin/mac/intel ./...

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

- name: Get current date time
id: current_datetime
Expand All @@ -48,22 +51,32 @@ jobs:
draft: false
prerelease: false

- name: Upload "Organize my files, Woodhouse!" for Linux
- name: Upload 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_path: ./bin/linux/woodhouse
asset_name: woodhouse.linux.bin
asset_content_type: application/octet-stream

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

- name: Upload woodhouse for Mac M1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/mac/m1/woodhouse
asset_name: woodhouse.mac.m1.bin
asset_content_type: application/octet-stream
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin/*/*
!bin/*/.keep
!bin/*/.keep
!bin/*/*/.keep
Empty file added bin/mac/intel/.keep
Empty file.
Empty file added bin/mac/m1/.keep
Empty file.

0 comments on commit 10ace8f

Please sign in to comment.