mobux 0.41.0

A touch-friendly tmux web UI for unhinged people who run terminal sessions from their phone while walking the dog
name: Release

# Tag-based releasing (semantic-release). Runs only after the CI workflow
# completes successfully on main: computes the next version from conventional
# commits since the latest v* tag, then tags + creates a GitHub release with
# generated notes + prebuilt Linux x86_64 and aarch64 binary assets (built by
# scripts/build-release-asset.sh, consumed by the in-app self-updater) +
# publishes to crates.io. No release PR, no commit back to main — the git tag
# is the version truth (in-repo Cargo.toml stays at the last committed
# version; the prepare step patches the real version in the workflow workspace
# only, so the built binary and the crates.io artifact carry it). See
# DEPLOY.md → "Release & publish".

on:
  workflow_run:
    workflows: [CI]
    types: [completed]

permissions:
  contents: write # create tags + GitHub releases

jobs:
  release:
    runs-on: ubuntu-latest
    # Only on a green CI run that was triggered by a push to main.
    if: >-
      github.event.workflow_run.conclusion == 'success' &&
      github.event.workflow_run.head_branch == 'main'
    concurrency:
      group: release
      cancel-in-progress: false
    steps:
      - uses: actions/checkout@v4
        with:
          # Full history + tags so semantic-release can find the last v* tag
          # and the commits since it.
          ref: main
          fetch-depth: 0
          fetch-tags: true
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu
      # rusqlite (bundled SQLite) and aws-lc-sys both compile C, so the aarch64
      # target needs a cross compiler and not only a linker.
      - name: Install the aarch64 cross toolchain
        run: |
          sudo apt-get update
          sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
      # The prepare step builds both release binaries (scripts/build-release-asset.sh).
      - uses: Swatinem/rust-cache@v2
      - run: npm ci
      - name: Run semantic-release
        run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}