Skip to content

Go Plugclient Cross-Platform Build #2

Go Plugclient Cross-Platform Build

Go Plugclient Cross-Platform Build #2

name: Go Plugclient Cross-Platform Build
on:
push:
branches: [master]
paths: [PlugsClientShelly/**]
workflow_dispatch:
jobs:
ubuntu:
name: Go Plugclient Cross-Platform Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Build for Linux ARM64
run: |
cd ./PlugsClientShelly
GOOS=linux GOARCH=arm64 go build -o plugclient-linux-arm64
- name: Build for Linux x64
run: |
cd ./PlugsClientShelly
GOOS=linux GOARCH=amd64 go build -o plugclient-linux-x64
- name: Build for Windows x64
run: |
cd ./PlugsClientShelly
GOOS=windows GOARCH=amd64 go build -o plugclient-win-x64.exe
- name: Commit build
run: |
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
git add ./PlugsClientShelly/plugclient-linux-arm64
git add ./PlugsClientShelly/plugclient-linux-x64
git add ./PlugsClientShelly/plugclient-win-x64.exe
git commit -am "Automated binary build"
git push