Skip to content

chore(gh): use linux as default #12

chore(gh): use linux as default

chore(gh): use linux as default #12

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
tags:
- v*
jobs:
build-and-release:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v5.0.0
with:
go-version: stable
- name: Build
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
GOOS=$GOOS GOARCH=$GOARCH go build -trimpath -o build/raiden ./cmd/raiden/main.go
cd build
if [[ $GOOS == 'darwin' ]]; then
cp raiden raiden-macos-"$GOARCH"
else
cp cvf raiden-linux-"$GOARCH"
fi
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/raiden-*
make_latest: true
generate_release_notes: true