emperor-folder 0.1.0

MCP server confined to one folder: list, read, search, stat, write, edit and move files, never outside the root
Documentation
name: Release

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

permissions:
  contents: read

jobs:
  build:
    name: ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          - os: macos-latest
            target: aarch64-apple-darwin
          # Intel-mac runners (macos-13) are retired; cross-compile on Apple Silicon.
          - os: macos-latest
            target: x86_64-apple-darwin
          - os: windows-latest
            target: x86_64-pc-windows-msvc
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@v2
      - run: cargo build --release --locked --target ${{ matrix.target }}
      - name: Package (unix)
        if: runner.os != 'Windows'
        run: |
          mkdir -p dist
          tar czf dist/emperor-folder-${{ github.ref_name }}-${{ matrix.target }}.tar.gz \
            -C target/${{ matrix.target }}/release emperor-folder
      - name: Package (windows)
        if: runner.os == 'Windows'
        shell: pwsh
        run: |
          New-Item -ItemType Directory -Force dist | Out-Null
          Compress-Archive -Path target/${{ matrix.target }}/release/emperor-folder.exe `
            -DestinationPath "dist/emperor-folder-${{ github.ref_name }}-${{ matrix.target }}.zip"
      - uses: actions/upload-artifact@v4
        with:
          name: dist-${{ matrix.target }}
          path: dist/*

  publish:
    name: checksums, attestations, release
    needs: build
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
      attestations: write
    steps:
      - uses: actions/download-artifact@v4
        with:
          pattern: dist-*
          path: dist
          merge-multiple: true
      - name: SHA256SUMS
        working-directory: dist
        run: sha256sum emperor-folder-* > SHA256SUMS && cat SHA256SUMS
      - name: Build provenance attestation
        uses: actions/attest-build-provenance@v2
        with:
          subject-path: |
            dist/emperor-folder-*
            dist/SHA256SUMS
      - name: Attach to release
        if: startsWith(github.ref, 'refs/tags/')
        uses: softprops/action-gh-release@v2
        with:
          prerelease: ${{ contains(github.ref_name, '-') }}
          files: |
            dist/emperor-folder-*
            dist/SHA256SUMS