brokk-sessionwiki 0.30.1

Find, search, and read every AI coding session you've ever had - across Claude Code, Codex, Gemini CLI, OpenCode, Cline, and more.
Documentation
name: Release

# Builds prebuilt binaries for every tagged version and attaches them to the
# GitHub Release, so users without a Rust toolchain can install in one step.
on:
  push:
    tags: ["v*"]

permissions:
  contents: write

jobs:
  build:
    name: ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          # Both macOS targets build on the Apple Silicon runner: the macOS SDK
          # is universal, so it cross-compiles x86_64 reliably. The dedicated
          # Intel runner (macos-13) is being deprecated and queues for hours.
          - os: macos-14
            target: aarch64-apple-darwin
          - os: macos-14
            target: x86_64-apple-darwin
          - os: windows-latest
            target: x86_64-pc-windows-msvc
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@v2
        with:
          key: ${{ matrix.target }}

      - name: Build
        run: cargo build --release --target ${{ matrix.target }} --bin sessionwiki

      - name: Package (unix)
        if: runner.os != 'Windows'
        shell: bash
        run: |
          bin=target/${{ matrix.target }}/release/sessionwiki
          dist=sessionwiki-${{ github.ref_name }}-${{ matrix.target }}
          mkdir "$dist"
          cp "$bin" "$dist/"
          cp README.md LICENSE "$dist/"
          tar czf "$dist.tar.gz" "$dist"
          shasum -a 256 "$dist.tar.gz" > "$dist.tar.gz.sha256"

      - name: Package (windows)
        if: runner.os == 'Windows'
        shell: bash
        run: |
          bin=target/${{ matrix.target }}/release/sessionwiki.exe
          dist=sessionwiki-${{ github.ref_name }}-${{ matrix.target }}
          mkdir "$dist"
          cp "$bin" "$dist/"
          cp README.md LICENSE "$dist/"
          7z a "$dist.zip" "$dist" >/dev/null
          certutil -hashfile "$dist.zip" SHA256 | sed -n 2p > "$dist.zip.sha256"

      - name: Build the release notes
        shell: bash
        run: |
          # The release was published with an EMPTY body while CHANGELOG.md
          # carried the notes, so every version looked the same on GitHub: a
          # version number and nothing else. Every matrix leg writes the same
          # file, so whichever uploads first sets the same body.
          TAG="${{ github.ref_name }}"
          sh scripts/release-notes.sh "$TAG" > RELEASE_NOTES.md
          if [ ! -s RELEASE_NOTES.md ]; then
            echo "CHANGELOG.md has no section for $TAG" >&2
            exit 1
          fi

      - name: Upload to release
        uses: softprops/action-gh-release@v3
        with:
          body_path: RELEASE_NOTES.md
          files: |
            sessionwiki-*.tar.gz
            sessionwiki-*.tar.gz.sha256
            sessionwiki-*.zip
            sessionwiki-*.zip.sha256
          fail_on_unmatched_files: false