name: release # Builds standalone PodTui binaries for each supported OS/arch and attaches # them to a GitHub Release. One runner per platform because Bun cannot # cross-compile — each runner runs `make dist`, which emits a # podtui--.tar.gz (binary + native libs side by side). # # Trigger: push a tag like v0.1.0. Bump VERSION in src/index.tsx in the same # commit as the tag so the released binary reports the tagged version. on: # intentional: YAML `on` key push: tags: - "v*" permissions: contents: write jobs: build: name: build (${{ matrix.os }} / ${{ matrix.arch }}) runs-on: ${{ matrix.os }} strategy: matrix: include: - os: ubuntu-latest arch: x64 plat: linux - os: ubuntu-24.04-arm arch: arm64 plat: linux - os: macos-15-intel arch: x64 plat: darwin - os: macos-14 arch: arm64 plat: darwin steps: - name: Check out repo uses: actions/checkout@v4 - name: Set up Bun uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: bun install - name: Install fftw (cavacore build dependency) run: | if uname -s | grep -qi darwin; then brew install fftw else sudo apt-get update sudo apt-get install -y libfftw3-dev fi - name: Build native cavacore library run: scripts/build-cavacore.sh - name: Build standalone binary + tarball run: make dist - name: Smoke-test binary boot env: DIST_TAR: podtui-${{ matrix.plat }}-${{ matrix.arch }}.tar.gz run: | # The embedded runtime reads the launching process's CWD bunfig.toml. # This repo's bunfig lists a preload the standalone can't resolve # ("preload not found"), so kicking the binary from the workspace root # would falsely fail every build. cd into a clean dir first. SMOKE_DIR=$(mktemp -d) tar -xzf "dist/$DIST_TAR" -C "$SMOKE_DIR" cd "$SMOKE_DIR" ./podtui-*/podtui --version - name: Upload artifact uses: actions/upload-artifact@v4 with: name: podtui-${{ matrix.plat }}-${{ matrix.arch }} path: dist/podtui-*.tar.gz upload: name: Attach to GitHub Release needs: build runs-on: ubuntu-latest steps: - name: Download all binaries uses: actions/download-artifact@v4 with: path: artifacts - name: Publish release uses: softprops/action-gh-release@v2 with: generate_release_notes: true files: | artifacts/**/*.tar.gz LICENSE