Skip to content

fix: bug fix (#41)

fix: bug fix (#41) #10

Workflow file for this run

name: Release
on:
push:
branches: [main]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- target: bun-darwin-arm64
asset: ws-darwin-arm64
os: macos-latest
- target: bun-darwin-x64
asset: ws-darwin-x64
os: macos-latest
- target: bun-linux-x64
asset: ws-linux-x64
os: ubuntu-latest
- target: bun-linux-arm64
asset: ws-linux-arm64
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: Build standalone binary
run: bun build --compile --target ${{ matrix.target }} src/index.ts --outfile ${{ matrix.asset }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ${{ matrix.asset }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Get version from package.json
id: version
run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"
- name: Delete existing latest release
run: gh release delete latest --yes --cleanup-tag 2>/dev/null || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
run: |
gh release create latest \
--title "latest" \
--notes "Latest build from main (v${{ steps.version.outputs.version }})" \
--latest \
artifacts/*
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}