Skip to content

Merge pull request #221 from SimplyLiz/develop #44

Merge pull request #221 from SimplyLiz/develop

Merge pull request #221 from SimplyLiz/develop #44

Workflow file for this run

name: Build Matrix
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false # Runs on main only — don't cancel artifact builds
permissions:
contents: read
jobs:
build:
name: Build (${{ matrix.os }}/${{ matrix.arch }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- os: linux
arch: arm64
- os: darwin
arch: amd64
- os: darwin
arch: arm64
- os: windows
arch: amd64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: 'go.mod'
cache: true
- name: Build
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
ext=""
if [ "$GOOS" = "windows" ]; then
ext=".exe"
fi
go build -ldflags="-s -w" -o "ckb-${GOOS}-${GOARCH}${ext}" ./cmd/ckb
- name: Upload artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ckb-${{ matrix.os }}-${{ matrix.arch }}
path: ckb-${{ matrix.os }}-${{ matrix.arch }}*
retention-days: 30