Store the .sql dump of the database in the repository, rather than th… #11
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: CI | |
| on: | |
| push: | |
| branches: ['*'] | |
| tags: | |
| - 'v*' | |
| jobs: | |
| cargo-check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set-up the cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check the source code | |
| run: cargo check | |
| cargo-clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Set-up the cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run Clippy | |
| run: cargo clippy -- -D warnings | |
| cargo-build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set-up the cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build the binary | |
| run: cargo build | |
| - name: Upload the binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bear-mcp-server | |
| path: target/debug/bear-mcp-server | |
| mcptools-test: | |
| name: Test with mcptools | |
| runs-on: ubuntu-latest | |
| needs: cargo-build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download the binary artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bear-mcp-server | |
| path: ./ | |
| - name: Make the binary executable | |
| run: chmod +x ./bear-mcp-server | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| - name: Install mcptools | |
| run: go install github.com/f/mcptools/cmd/mcptools@latest | |
| - name: Run the test | |
| run: ./scripts/test-with-mcptools.sh | |
| release: | |
| name: Release | |
| environment: Publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| needs: [cargo-check, cargo-clippy, mcptools-test] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up crates.io authentication | |
| uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set-up the cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Publish to crates.io | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| run: cargo publish |