Skip to content

Commit

Permalink
fix windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
useEffects committed Jul 27, 2024
1 parent df2a0ea commit 7459fc0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Release Binaries
on:
push:
branches:
- main
- main # Trigger the workflow on push to the main branch

jobs:
build:
Expand Down Expand Up @@ -31,11 +31,20 @@ jobs:
with:
go-version: '1.22.3'

- name: Build binary
- name: Build binary (Linux and macOS)
if: runner.os != 'Windows'
run: |
mkdir -p dist
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -o dist/golox-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
- name: Build binary (Windows)
if: runner.os == 'Windows'
run: |
mkdir dist
$env:GOOS="${{ matrix.GOOS }}"
$env:GOARCH="${{ matrix.GOARCH }}"
go build -o dist/golox-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
- name: Upload binary
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -133,4 +142,3 @@ jobs:
asset_path: dist/golox-darwin-amd64
asset_name: golox-darwin-amd64
asset_content_type: application/octet-stream

0 comments on commit 7459fc0

Please sign in to comment.