Skip to content

Commit

Permalink
github action using macos & windows vm
Browse files Browse the repository at this point in the history
  • Loading branch information
samyfodil committed Apr 30, 2024
1 parent cb5b6e3 commit 86c4b03
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
51 changes: 49 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- '*'

jobs:
goreleaser:
linux:
runs-on: ubuntu-latest
steps:
-
Expand All @@ -24,6 +24,53 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean --config .goreleaser.yml
args: release --clean --config .goreleaser.yml --id linux
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}

mac:
runs-on: macos-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.0'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean --config .goreleaser.yml --id darwin
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}


windows:
runs-on: windows-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.0'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean --config .goreleaser.yml --id windows
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
5 changes: 5 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ builds:
binary: "dreamland"
goos:
- darwin
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=1
flags:
- -trimpath
tags:
- darwin
- odo
Expand Down

0 comments on commit 86c4b03

Please sign in to comment.