Skip to content

Build

Build #217

Workflow file for this run

name: Build
on:
- push
- pull_request
env:
CARGO_PKG_VERSION: "0.2.${{ github.run_number }}"
permissions:
contents: write
jobs:
selene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install selene
run: |
wget -O selene https://github.com/Kampfkarren/selene/releases/latest/download/selene-linux
chmod +x selene
sudo mv selene /usr/local/bin/selene
- name: Run selene
run: |
cd plugin
selene .
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install StyLua
run: |
wget -O stylua https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux
chmod +x stylua
sudo mv stylua /usr/local/bin/stylua
- name: Run StyLua
run: |
cd plugin
stylua . --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run cargo clippy
run: cargo clippy -- -D warnings
build-macos:
runs-on: macos-latest
needs: [selene, stylua, clippy]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
- 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
# Create universal binary
mkdir -p "target/aarch64-apple-darwin/release/bundle/osx/RobloxStudioMCP.app/Contents/MacOS/"
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: |
echo "Skipping macOS signing - signing script not found"
mkdir -p output
zip -r output/macOS-rbx-studio-mcp.zip target/aarch64-apple-darwin/release/bundle/
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
needs: [selene, stylua, clippy]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
- name: Build
run: |
cargo install cargo-edit
cargo set-version --workspace "$CARGO_PKG_VERSION"
cargo build --release
- name: Prepare artifacts
run: |
echo "Preparing Windows build artifacts"
if (-not (Test-Path output)) { New-Item -ItemType Directory -Path output }
if (Test-Path target\release\rbx-studio-mcp.exe) {
copy target\release\rbx-studio-mcp.exe output\rbx-studio-mcp.exe
} else {
Write-Error "Build artifact not found: target\release\rbx-studio-mcp.exe"
exit 1
}
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:
- name: Create output directory
run: mkdir -p output
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: output
merge-multiple: true
- name: List artifacts
run: ls -la output/
- 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/*
fail_on_unmatched_files: true