Skip to content

WIP

WIP #3

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: Go
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
GOOS: [linux, windows, darwin]
GOARCH: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Get dependencies
run: |
go mod -C ./src download
go mod -C ./src verify
- name: Build for ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
run: |
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -C ./src -o $GITHUB_WORKSPACE/bin/$(basename $GITHUB_REPOSITORY)
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
path: $GITHUB_WORKSPACE/bin/$(basename $GITHUB_REPOSITORY)