Skip to content

Claude code instructions #287

Claude code instructions

Claude code instructions #287

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
env:
CARGO_PKG_VERSION: "0.2.${{ github.run_number }}"
permissions:
contents: write
jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Get Rust version
id: rust-version
run: echo "version=$(rustc --version | shasum -a 256 | cut -d' ' -f1)" >> $GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.rustup
target
key: ${{ runner.os }}-rust-${{ steps.rust-version.outputs.version }}
- name: Build
run: |
cargo install cargo-bundle cargo-edit
cargo set-version --workspace "$CARGO_PKG_VERSION"
rustup target add x86_64-apple-darwin aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin --target x86_64-apple-darwin
cargo bundle --release --target aarch64-apple-darwin
lipo -create target/aarch64-apple-darwin/release/rbx-studio-mcp target/x86_64-apple-darwin/release/rbx-studio-mcp -output "target/aarch64-apple-darwin/release/bundle/osx/RobloxStudioMCP.app/Contents/MacOS/rbx-studio-mcp"
- name: Sign and Notarize macOS binary
run: ./util/sign.macos.sh
env:
APPLE_API_KEY: key.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY_CONTENT: ${{ secrets.APPLE_API_KEY_CONTENT }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macOS-rbx-studio-mcp
path: output/macOS-rbx-studio-mcp.zip
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Get Rust version
id: rust-version
shell: pwsh
run: |
$version = (rustc --version | Out-String).Trim()
$hash = (Get-FileHash -InputStream ([System.IO.MemoryStream]::new([System.Text.Encoding]::UTF8.GetBytes($version))) -Algorithm SHA256).Hash.ToLower()
echo "version=$hash" >> $env:GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.rustup
target
key: ${{ runner.os }}-rust-${{ steps.rust-version.outputs.version }}
- name: Build
run: |
cargo install cargo-edit
cargo set-version --workspace "$CARGO_PKG_VERSION"
mkdir output
cargo build --release
- name: Sign windows binary
run: ./util/sign.windows.ps1
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
SIGNING_ACCOUNT: ${{ secrets.SIGNING_ACCOUNT }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Windows-rbx-studio-mcp
path: output/rbx-studio-mcp.exe
release:
runs-on: ubuntu-latest
if: ${{ github.ref_name == github.event.repository.default_branch }}
needs: [build-macos, build-windows]
steps:
- run: mkdir -p output
- uses: actions/download-artifact@v4
with:
path: output
merge-multiple: true
- name: Create release
uses: Roblox-ActionsCache/softprops-action-gh-release@v1
with:
tag_name: v${{ env.CARGO_PKG_VERSION }}
release_name: Release v${{ env.CARGO_PKG_VERSION }} }}
files: output/*