Skip to content

build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#34) #223

build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#34)

build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#34) #223

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build_multi_platform:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: "1.20"
- name: Build for multi-platform
run: |
set -xeu
DIST=dist
mkdir $DIST
# (from: https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04)
platforms=("linux/amd64" "darwin/amd64" "linux/arm" "windows/amd64")
for platform in "${platforms[@]}"
do
platform_split=(${platform//\// })
export GOOS=${platform_split[0]}
export GOARCH=${platform_split[1]}
[ $GOOS = "windows" ] && EXTENSION='.exe' || EXTENSION=''
BUILD_PATH=piping-sshd-$GOOS-$GOARCH
mkdir $BUILD_PATH
# Build
CGO_ENABLED=0 go build -o "${BUILD_PATH}/piping-sshd${EXTENSION}" main/main.go
done