Release Multi-Platform Binaries with GitHub Actions

Thinpack ships an official GitHub Action (action-v1.0.0) that downloads the verified v0.3.1 archive, checks SHA256SUMS, and outputs your standalone binary path and target triple.

.github/workflows/release.yml
name: Release

on:
  push:
    tags: ["v*"]

permissions:
  contents: read

jobs:
  pack:
    strategy:
      fail-fast: false
      matrix:
        runner: [ubuntu-24.04, macos-latest, windows-latest]
    runs-on: ${{ matrix.runner }}
    steps:
      - uses: actions/checkout@v7
      - run: npm ci
      - uses: thinpack-js/thinpack.js@main
        id: pack
        with:
          version: v0.3.1
          entry: src/cli.js
          name: my-cli
      - name: Archive the executable
        shell: bash
        env:
          BINARY: ${{ steps.pack.outputs.binary }}
          TARGET: ${{ steps.pack.outputs.target }}
        run: |
          tar -czf "my-cli-${TARGET}.tar.gz" -C "$(dirname "$BINARY")" "$(basename "$BINARY")"
      - uses: actions/upload-artifact@v7
        with:
          name: my-cli-${{ steps.pack.outputs.target }}
          path: my-cli-${{ steps.pack.outputs.target }}.tar.gz
          if-no-files-found: error

Shipping smaller Node.js CLIs? Star thinpack.js on GitHub

thinpack.js is 100% MIT-licensed and actively developed in Rust + JavaScript. If you ship Node.js CLIs and want 4–12 MiB binaries instead of 104–158 MiB runtimes, starring the repository helps other developers discover it and prioritizes new Node compatibility fixtures.