Skip to content

1.0.9

1.0.9 #52

Workflow file for this run

name: build
on:
release:
types: [published]
jobs:
build:
if: "!github.event.release.prerelease"
name: Building ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux-amd64
zssh_artifact_name: zssh
zssh_asset_name: zssh-linux-amd64
zscp_artifact_name: zscp
zscp_asset_name: zscp-linux-amd64
- os: windows-latest
arch: windows-amd64
zssh_artifact_name: zssh.exe
zssh_asset_name: zssh-windows-amd64.exe
zscp_artifact_name: zscp.exe
zscp_asset_name: zscp-windows-amd64.exe
- os: macos-latest
arch: macos-amd64
zssh_artifact_name: zssh
zssh_asset_name: zssh-macos-amd64
zscp_artifact_name: zscp
zscp_asset_name: zscp-macos-amd64
- os: macos-latest
arch: macos-arm64
zssh_artifact_name: zssh
zssh_asset_name: zssh-macos-arm64
zscp_artifact_name: zscp
zscp_asset_name: zscp-macos-arm64
- os: ubuntu-latest
arch: linux-arm
go_opts: CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm
zssh_artifact_name: zssh
zssh_asset_name: zssh-linux-arm
zscp_artifact_name: zscp
zscp_asset_name: zscp-linux-arm
- os: ubuntu-latest
arch: linux-arm64
go_opts: CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc GOOS=linux GOARCH=arm64
zssh_artifact_name: zssh
zssh_asset_name: zssh-linux-arm64
zscp_artifact_name: zscp
zscp_asset_name: zscp-linux-arm64
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- if: ${{ matrix.arch=='linux-arm' }}
name: Install gcc for arm
run: sudo apt-get install gcc-arm-linux-gnueabi -y
- if: ${{ matrix.arch=='linux-arm64' }}
name: Install gcc for arm 64
run: sudo apt-get install gcc-aarch64-linux-gnu -y
- name: Make the build dir
run: mkdir "${{ runner.workspace }}/build"
- name: Build
run: ${{ matrix.go_opts }} go build -o ${{ runner.workspace }}/build ./...
- name: Upload zssh binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ runner.workspace }}/build/${{ matrix.zssh_artifact_name }}
asset_name: ${{ matrix.zssh_asset_name }}
tag: ${{ github.ref }}
- name: Upload zscp binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ runner.workspace }}/build/${{ matrix.zscp_artifact_name }}
asset_name: ${{ matrix.zscp_asset_name }}
tag: ${{ github.ref }}