Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
feat: add darwin builds
Browse files Browse the repository at this point in the history
  • Loading branch information
menzerath committed Aug 17, 2021
1 parent 492fb01 commit 98d2790
Showing 1 changed file with 57 additions and 11 deletions.
68 changes: 57 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
pull_request:
branches:
- main
release:
types:
- published

jobs:
build_linux:
Expand All @@ -26,12 +23,12 @@ jobs:
env:
GOOS: "linux"
GOARCH: "amd64"
run: go build -o build/monstercat main.go
run: go build -o build/monstercat_linux_amd64 main.go
- name: store binary
uses: actions/upload-artifact@v2
with:
name: linux
path: build/monstercat
path: build/
build_windows:
runs-on: ubuntu-latest
steps:
Expand All @@ -44,15 +41,51 @@ jobs:
env:
GOOS: "windows"
GOARCH: "amd64"
run: go build -o build/monstercat.exe main.go
run: go build -o build/monstercat_windows_amd64.exe main.go
- name: store binary
uses: actions/upload-artifact@v2
with:
name: windows
path: build/monstercat.exe
path: build/
build_darwin_amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup golang
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: build project
env:
GOOS: "darwin"
GOARCH: "amd64"
run: go build -o build/monstercat_darwin_amd64 main.go
- name: store binary
uses: actions/upload-artifact@v2
with:
name: darwin_amd64
path: build/
build_darwin_arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup golang
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: build project
env:
GOOS: "darwin"
GOARCH: "arm64"
run: go build -o build/monstercat_darwin_arm64 main.go
- name: store binary
uses: actions/upload-artifact@v2
with:
name: darwin_arm64
path: build/
release:
runs-on: ubuntu-latest
needs: [build_linux, build_windows]
needs: [build_linux, build_windows, build_darwin_amd64, build_darwin_arm64]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: download linux binary
Expand All @@ -65,8 +98,21 @@ jobs:
with:
name: windows
path: windows/
- uses: softprops/action-gh-release@v1
- name: download darwin amd64 binary
uses: actions/download-artifact@v2
with:
name: darwin_amd64
path: darwin_amd64/
- name: download darwin arm64 binary
uses: actions/download-artifact@v2
with:
name: darwin_arm64
path: darwin_arm64/
- name: upload artifacts to release
uses: softprops/action-gh-release@v1
with:
files: |
linux/monstercat
windows/monstercat.exe
linux/monstercat_linux_amd64
windows/monstercat_windows_amd64.exe
darwin_amd64/monstercat_darwin_amd64
darwin_arm64/monstercat_darwin_arm64

0 comments on commit 98d2790

Please sign in to comment.