Skip to content

Commit

Permalink
Add workflow to upload binaries to GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
evanebb committed Mar 30, 2024
1 parent 3fe5ef0 commit 416832d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and test
on:
push:
tags:
- '*'

jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v4

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

- name: Build
run: go build -o ./bin/gobble-$GOOS-$GOARCH -v ./cmd/gobble
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0

- name: Upload binaries to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release upload ${{ github.event.release.tag_name }} bin/gobble-$GOOS-$GOARCH

0 comments on commit 416832d

Please sign in to comment.