ublx 0.1.7

TUI to index once, enrich with metadata, and browse a flat snapshot in a 3-pane layout with multiple modes.
Documentation
name: Release

on:
  push:
    tags:
      - 'v*'
  workflow_dispatch:

permissions:
  contents: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5
        with:
          fetch-depth: 0

      # Tag pushes only: workflow_dispatch from a branch has no tag to release.
      - name: Create draft release
        if: startsWith(github.ref, 'refs/tags/')
        uses: softprops/action-gh-release@v3
        with:
          name: Release ${{ github.ref_name }}
          tag_name: ${{ github.ref_name }}
          draft: true
          generate_release_notes: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  bump-homebrew-formula:
    name: Bump Homebrew formula
    runs-on: ubuntu-latest
    # workflow_dispatch has no tag — tarball URL would be wrong.
    if: startsWith(github.ref, 'refs/tags/')
    steps:
      - name: Checkout main
        uses: actions/checkout@v5
        with:
          ref: main
          fetch-depth: 0

      - name: Update Formula/ublx.rb (url + sha256)
        env:
          TAG: ${{ github.ref_name }}
          REPO: ${{ github.repository }}
        run: python3 .github/scripts/bump-homebrew-formula.py

      - name: Commit and push
        env:
          TAG: ${{ github.ref_name }}
        run: bash .github/scripts/commit-and-push-formula.sh

  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/')
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@v5

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: '1.95'

      - name: Install NetCDF (Ubuntu)
        run: |
          sudo apt-get update
          sudo apt-get install -y libnetcdf-dev pkg-config

      - uses: rust-lang/crates-io-auth-action@v1
        id: auth

      - run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}