Skip to content

Golang

Golang #24

Workflow file for this run

name: Build
on:
push:
branches: [ main, 2.0 ]
pull_request:
branches: [ main, 2.0 ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
if [ "$GOOS" = "windows" ]; then
go build -o dot-${{ matrix.goos }}-${{ matrix.goarch }}.exe ./cmd/dot
else
go build -o dot-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/dot
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dot-${{ matrix.goos }}-${{ matrix.goarch }}
path: dot-${{ matrix.goos }}-${{ matrix.goarch }}*