Skip to content

Go Plugclient Cross-Platform Build #1

Go Plugclient Cross-Platform Build

Go Plugclient Cross-Platform Build #1

name: Go Cross-Platform Build
on:
push:
branches: [master]
paths: [PlugsClientShelly/**]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, linux, windows]
goarch: [arm64, amd64, amd64]
exclude:
- goos: linux
goarch: amd64
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Build
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o output/${{ matrix.goos }}_${{ matrix.goarch }}/PlugsClientShelly
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: PlugsClientShelly-${{ matrix.goos }}-${{ matrix.goarch }}
path: output/${{ matrix.goos }}_${{ matrix.goarch }}/PlugsClientShelly