Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/release binaries #18

Merged
merged 4 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/release_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Binaries

on:
push:
branches: [ "main" ]

jobs:
build:
name: Build Release Assets
runs-on: ubuntu-latest

strategy:
matrix:
# Add more platforms as needed
goos: [linux, darwin, windows]
goarch: [amd64, arm64]

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}

- name: Build binary
run: |
mkdir -p dist
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/${{ github.event.repository.name }}_${{ matrix.goos }}_${{ matrix.goarch }} .

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: dist/