Skip to content

add workflow for build #9

add workflow for build

add workflow for build #9

Workflow file for this run

name: build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y libpcap-dev
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24.2'
- name: Test
run: go test -v ./...
- name: Build
env:
goos: ${{ matrix.goos }}
goarch: ${{ matrix.arch }}
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -trimpath -o boop-${{ matrix.goos }}.${{ matrix.goarch }} ./...