Skip to content

infping - Release v1.3 #7

infping - Release v1.3

infping - Release v1.3 #7

Workflow file for this run

name: Release
on:
release:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: ['amd64', 'arm64']
os: ['linux', 'darwin', 'windows']
include:
- os: linux
arch: 'arm'
goarm: '7'
steps:
- uses: actions/checkout@v3
- name: Prepare build
run: |
echo "GOARCH=${{ matrix.arch }}" >>${GITHUB_ENV}
echo "GOOS=${{ matrix.os }}" >>${GITHUB_ENV}
if [[ ! -z "${{ matrix.goarm }}" ]]; then
echo "GOARM=${{ matrix.goarm }}" >>${GITHUB_ENV}
fi
echo "EXEC_NAME=infping-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.goarm }}" >>${GITHUB_ENV}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: |
go get -v
go build -o ${EXEC_NAME} -v
- name: Upload to release
uses: svenstaro/upload-release-action@2.7.0
with:
file: '${EXEC_NAME}'