Skip to content

Add workflow to upload binaries to GitHub release #1

Add workflow to upload binaries to GitHub release

Add workflow to upload binaries to GitHub release #1

Workflow file for this run

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