
Some checks failed
Build Process Supervisor / build (amd64, , linux) (push) Failing after 4m42s
Build Process Supervisor / build (amd64, .exe, windows) (push) Failing after 4m43s
Build Process Supervisor / build (arm, 6, , linux) (push) Has been cancelled
Build Process Supervisor / build (arm64, , linux) (push) Failing after 5m12s
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: Build Process Supervisor
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
env:
|
|
APP_NAME: processSupervisor
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: windows
|
|
arch: amd64
|
|
ext: .exe
|
|
- os: linux
|
|
arch: amd64
|
|
ext: ""
|
|
- os: linux
|
|
arch: arm64
|
|
ext: ""
|
|
- os: linux
|
|
arch: arm
|
|
arm_version: 6
|
|
ext: ""
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 'stable'
|
|
|
|
- name: Build binaries
|
|
run: |
|
|
OUTPUT="bin/${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}"
|
|
if [ "${{ matrix.arm_version }}" != "" ]; then
|
|
OUTPUT="${OUTPUT}v${{ matrix.arm_version }}"
|
|
fi
|
|
OUTPUT="${OUTPUT}${{ matrix.ext }}"
|
|
echo "Building $OUTPUT"
|
|
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \
|
|
{{ matrix.arm_version && format('GOARM={0}', matrix.arm_version) || '' }} \
|
|
go build -ldflags="-s -w" -trimpath -o "$OUTPUT"
|
|
shell: bash
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.arm_version && format('v{0}', matrix.arm_version) || '' }}${{ matrix.ext }}
|
|
path: bin/${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.arm_version && format('v{0}', matrix.arm_version) || '' }}${{ matrix.ext }} |