Skip to content

v1.13.0

v1.13.0 #28

name: Release Binaries
on:
release:
types: [published]
workflow_call:
inputs:
tag:
required: true
type: string
workflow_dispatch:
inputs:
tag:
required: true
type: string
# Serialize runs per tag: release/workflow_call/workflow_dispatch can otherwise
# race on uploading assets for the same release.
concurrency:
group: release-binaries-${{ inputs.tag || github.event.release.tag_name }}
cancel-in-progress: false
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
# Native runner per target: cross-compiles bundle the host's @napi-rs/keyring
# native addon, and the binary crashes on every other platform.
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- target: bun-linux-x64
runner: ubuntu-latest
outfile: dist/qawolf-linux-x64
# ubuntu-24.04-arm assumes the repo is public (free arm runners)
- target: bun-linux-arm64
runner: ubuntu-24.04-arm
outfile: dist/qawolf-linux-arm64
# macos-15-intel is the last Intel macOS image (supported until fall 2027)
- target: bun-darwin-x64
runner: macos-15-intel
outfile: dist/qawolf-darwin-x64
- target: bun-darwin-arm64
runner: macos-latest
outfile: dist/qawolf-darwin-arm64
- target: bun-windows-x64
runner: windows-latest
outfile: dist/qawolf-windows-x64.exe
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: package.json
- run: bun install --frozen-lockfile
- name: Build binary
run: bun run build:binary --target="${{ matrix.target }}" --outfile="${{ matrix.outfile }}"
- name: Smoke test binary
run: ./${{ matrix.outfile }} --version
- name: Upload to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# env indirection keeps the dispatch-provided tag out of shell template expansion
RELEASE_TAG: ${{ inputs.tag || github.event.release.tag_name }}
run: |
[[ "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.]+)?$ ]] || {
echo "Invalid release tag: $RELEASE_TAG" >&2
exit 1
}
gh release upload "$RELEASE_TAG" "${{ matrix.outfile }}" --clobber