Release Rust Server #4
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 Rust Server | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # Triggers on version tags like v1.2.3 | |
| workflow_dispatch: | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # install nix with determinat nix installer | |
| - uses: DeterminateSystems/nix-installer-action@main | |
| - uses: DeterminateSystems/magic-nix-cache-action@main | |
| - uses: DeterminateSystems/flake-checker-action@main | |
| - name: Build Linux binary | |
| run: cd server && nix develop --command cargo build --release --target x86_64-unknown-linux-gnu | |
| - name: Build macOS binary | |
| run: cd server && nix develop --command cargo zigbuild --release --target x86_64-apple-darwin | |
| - name: Prepare binaries for release | |
| run: | | |
| mkdir -p dist | |
| cp server/target/x86_64-unknown-linux-gnu/release/server dist/mcp-v8-linux | |
| cp server/target/x86_64-apple-darwin/release/server dist/mcp-v8-macos | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/mcp-v8-linux | |
| dist/mcp-v8-macos | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |