Skip to content

init

init #2

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.10
- name: Install dependencies
run: go get .
- name: Build
shell: bash
run: |
if [ "${{ matrix.os }}" = "ubuntu-20.04" ]; then
go build -trimpath -ldflags "-s -w" -o httpdump httpdump.go
elif [ "${{ matrix.os }}" = "windows-2019" ]; then
go build -trimpath -ldflags "-s -w" -o httpdump.exe httpdump.go
fi