This repository was archived by the owner on Apr 21, 2026. It is now read-only.
fix: CLAUDE.md/AGENTS.md paths, config loading, drop ci.yml #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| # Builds prebuilt binaries for macOS/Linux on each tagged release. | |
| # Triggered by pushing a `v*` tag (e.g. `v0.0.1`). | |
| # | |
| # Outputs per platform: | |
| # thoth-<version>-<target>.tar.gz containing `thoth`, `thoth-mcp`, `thoth-gate` | |
| # thoth-<version>-<target>.tar.gz.sha256 | |
| # | |
| # Consumers (Homebrew formula, npm install script) fetch these directly. | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag to build (e.g. v0.0.1). Leave blank for a dry-run." | |
| required: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| # -------------------------------------------------------------- binaries | |
| build: | |
| name: build (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-22.04 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-22.04 | |
| cross: true | |
| - target: aarch64-apple-darwin | |
| os: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross (Linux aarch64 only) | |
| if: matrix.cross | |
| run: cargo install cross --locked | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Build release binaries | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.cross }}" = "true" ]; then | |
| cross build --release --target ${{ matrix.target }} \ | |
| -p thoth-cli -p thoth-mcp | |
| else | |
| cargo build --release --target ${{ matrix.target }} \ | |
| -p thoth-cli -p thoth-mcp | |
| fi | |
| - name: Stage + tar + checksum | |
| id: stage | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| if [ -z "$VERSION" ] || [ "$VERSION" = "$GITHUB_REF_NAME" ]; then | |
| VERSION="${{ github.event.inputs.tag }}" | |
| VERSION="${VERSION#v}" | |
| VERSION="${VERSION:-0.0.0-dev}" | |
| fi | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| NAME="thoth-${VERSION}-${{ matrix.target }}" | |
| mkdir -p "dist/$NAME" | |
| cp "target/${{ matrix.target }}/release/thoth" "dist/$NAME/" | |
| cp "target/${{ matrix.target }}/release/thoth-mcp" "dist/$NAME/" | |
| cp "target/${{ matrix.target }}/release/thoth-gate" "dist/$NAME/" | |
| cp README.md LICENSE-MIT LICENSE-APACHE "dist/$NAME/" || true | |
| tar -C dist -czf "dist/${NAME}.tar.gz" "$NAME" | |
| (cd dist && shasum -a 256 "${NAME}.tar.gz" > "${NAME}.tar.gz.sha256") | |
| ls -la dist/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: thoth-${{ matrix.target }} | |
| path: | | |
| dist/*.tar.gz | |
| dist/*.sha256 | |
| if-no-files-found: error | |
| # ----------------------------------------------------------- gh release | |
| publish: | |
| name: publish release | |
| needs: [build] | |
| runs-on: ubuntu-22.04 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Upload to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/*.tar.gz | |
| dist/*.sha256 | |
| generate_release_notes: true |