Skip to content

Update release-build.yml #1

Update release-build.yml

Update release-build.yml #1

Workflow file for this run

name: Build ZScript Binaries
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ---------------- LINUX ----------------
- os: ubuntu-latest
name: linux-x64
target: bun-linux-x64
ext: ""
- os: ubuntu-latest
name: linux-x64-baseline
target: bun-linux-x64-baseline
ext: ""
- os: ubuntu-latest
name: linux-x64-musl
target: bun-linux-x64-musl
ext: ""
- os: ubuntu-latest
name: linux-arm64
target: bun-linux-arm64
ext: ""
- os: ubuntu-latest
name: linux-arm64-musl
target: bun-linux-arm64-musl
ext: ""
# ---------------- WINDOWS ----------------
- os: windows-latest
name: windows-x64
target: bun-windows-x64
ext: ".exe"
- os: windows-latest
name: windows-x64-baseline
target: bun-windows-x64-baseline
ext: ".exe"
# ---------------- MACOS ----------------
- os: macos-latest
name: macos-x64
target: bun-darwin-x64
ext: ""
- os: macos-latest
name: macos-arm64
target: bun-darwin-arm64
ext: ""
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
working-directory: compiler
run: bun install
- name: Build zsc binary
working-directory: compiler
run: |
mkdir -p dist
bun build zsc.js \
--compile \
--target=${{ matrix.target }} \
--outfile dist/zsc${{ matrix.ext }}
# -------- UNIX (Linux + macOS) --------
- name: Package (tar.gz)
if: runner.os != 'Windows'
working-directory: compiler/dist
run: |
chmod +x zsc
tar -czf zsc-${{ matrix.name }}.tar.gz zsc
# -------- WINDOWS --------
- name: Package (zip)
if: runner.os == 'Windows'
working-directory: compiler/dist
run: |
powershell Compress-Archive zsc.exe zsc-${{ matrix.name }}.zip
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
compiler/dist/*.zip
compiler/dist/*.tar.gz