Skip to content

fix stale objectiveai-* path/import refs left over from the sdk-rename #188

fix stale objectiveai-* path/import refs left over from the sdk-rename

fix stale objectiveai-* path/import refs left over from the sdk-rename #188

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
# Per-leg flat structure:
#
# check-version
# ├─→ create-release
# │
# ├─→ mcp-fs-<leg> ──→ cli-<leg> (× 10 platforms, all chains independent)
#
# Every CLI platform has its own dedicated `mcp-fs-<leg>` upstream so a
# slow runner allocation, slow build, or transient failure on one
# platform's mcp-filesystem can't gate any other platform's CLI build.
# The 6 x86_64-musl mcp-fs jobs and 4 aarch64-musl mcp-fs jobs build
# identical binaries — duplicated work, but parallel, in exchange for
# total per-leg isolation.
jobs:
check-version:
name: Check CLI version
runs-on: ubuntu-latest
outputs:
should-release: ${{ steps.check.outputs.should-release }}
version: ${{ steps.check.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read version from objectiveai-cli/Cargo.toml
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(cargo metadata --format-version 1 --no-deps --manifest-path objectiveai-cli/Cargo.toml | jq -r '.packages[] | select(.name == "objectiveai-cli") | .version')
echo "CLI version: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
if gh release view "v$VERSION" --repo "${{ github.repository }}" >/dev/null 2>&1; then
echo "Release v$VERSION already exists — skipping build"
echo "should-release=false" >> "$GITHUB_OUTPUT"
else
echo "Release v$VERSION does not exist — will build"
echo "should-release=true" >> "$GITHUB_OUTPUT"
fi
create-release:
name: Create release
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate release notes
# Write notes to a file rather than capturing into a step output —
# commit messages routinely contain backticks (`like this`) and
# other shell metacharacters, which GHA's `${{ }}` interpolator
# would inline literally into the next step's bash script and
# cause bash to try evaluating them as command substitutions.
# `--notes-file` reads the bytes directly with zero shell
# interpolation involved.
run: |
PREV_TAG=$(git tag --list 'v*' --sort=-v:refname | head -n 1)
if [ -n "$PREV_TAG" ]; then
echo "Previous tag: $PREV_TAG"
git log --pretty=format:"- %s" "$PREV_TAG"..HEAD > release-notes.md
else
echo "No previous tags — using full history"
git log --pretty=format:"- %s" > release-notes.md
fi
- name: Create release if missing
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ needs.check-version.outputs.version }}"
if gh release view "v$VERSION" --repo "${{ github.repository }}" >/dev/null 2>&1; then
echo "Release v$VERSION already exists — leaving as-is."
exit 0
fi
# Created without --draft so per-asset uploads are user-visible
# the moment each cli-<leg> job finishes uploading. CLI legs
# append assets in parallel via `gh release upload --clobber`.
gh release create "v$VERSION" \
--repo "${{ github.repository }}" \
--target "${{ github.sha }}" \
--title "v$VERSION" \
--notes-file release-notes.md
# ── mcp-filesystem builders (10 dedicated jobs, all on Linux runners) ─────
mcp-fs-linux-x86_64:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: x86_64-unknown-linux-musl
artifact-name: mcp-filesystem-linux-x86_64
mcp-fs-linux-x86_64-no-viewer:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: x86_64-unknown-linux-musl
artifact-name: mcp-filesystem-linux-x86_64-no-viewer
mcp-fs-linux-aarch64:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: aarch64-unknown-linux-musl
artifact-name: mcp-filesystem-linux-aarch64
mcp-fs-linux-aarch64-no-viewer:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: aarch64-unknown-linux-musl
artifact-name: mcp-filesystem-linux-aarch64-no-viewer
mcp-fs-macos-x86_64:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: x86_64-unknown-linux-musl
artifact-name: mcp-filesystem-macos-x86_64
mcp-fs-macos-x86_64-no-viewer:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: x86_64-unknown-linux-musl
artifact-name: mcp-filesystem-macos-x86_64-no-viewer
mcp-fs-macos-aarch64:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: aarch64-unknown-linux-musl
artifact-name: mcp-filesystem-macos-aarch64
mcp-fs-macos-aarch64-no-viewer:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: aarch64-unknown-linux-musl
artifact-name: mcp-filesystem-macos-aarch64-no-viewer
mcp-fs-windows-x86_64:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: x86_64-unknown-linux-musl
artifact-name: mcp-filesystem-windows-x86_64
mcp-fs-windows-x86_64-no-viewer:
needs: check-version
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-mcp-filesystem
with:
target: x86_64-unknown-linux-musl
artifact-name: mcp-filesystem-windows-x86_64-no-viewer
# ── CLI builders (10 dedicated jobs, each pinned to its mcp-fs upstream) ──
cli-linux-x86_64:
needs: [check-version, create-release, mcp-fs-linux-x86_64]
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: x86_64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-linux-x86_64
asset: objectiveai-linux-x86_64
src_name: objectiveai
install_args: ""
viewer: "true"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-linux-x86_64-no-viewer:
needs: [check-version, create-release, mcp-fs-linux-x86_64-no-viewer]
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: x86_64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-linux-x86_64-no-viewer
asset: objectiveai-linux-x86_64-no-viewer
src_name: objectiveai
install_args: "--no-viewer"
viewer: "false"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-linux-aarch64:
needs: [check-version, create-release, mcp-fs-linux-aarch64]
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-24.04-arm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: aarch64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-linux-aarch64
asset: objectiveai-linux-aarch64
src_name: objectiveai
install_args: ""
viewer: "true"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-linux-aarch64-no-viewer:
needs: [check-version, create-release, mcp-fs-linux-aarch64-no-viewer]
if: needs.check-version.outputs.should-release == 'true'
runs-on: ubuntu-24.04-arm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: aarch64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-linux-aarch64-no-viewer
asset: objectiveai-linux-aarch64-no-viewer
src_name: objectiveai
install_args: "--no-viewer"
viewer: "false"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-macos-x86_64:
needs: [check-version, create-release, mcp-fs-macos-x86_64]
if: needs.check-version.outputs.should-release == 'true'
runs-on: macos-13
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: x86_64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-macos-x86_64
asset: objectiveai-macos-x86_64
src_name: objectiveai
install_args: ""
viewer: "true"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-macos-x86_64-no-viewer:
needs: [check-version, create-release, mcp-fs-macos-x86_64-no-viewer]
if: needs.check-version.outputs.should-release == 'true'
runs-on: macos-13
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: x86_64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-macos-x86_64-no-viewer
asset: objectiveai-macos-x86_64-no-viewer
src_name: objectiveai
install_args: "--no-viewer"
viewer: "false"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-macos-aarch64:
needs: [check-version, create-release, mcp-fs-macos-aarch64]
if: needs.check-version.outputs.should-release == 'true'
runs-on: macos-14
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: aarch64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-macos-aarch64
asset: objectiveai-macos-aarch64
src_name: objectiveai
install_args: ""
viewer: "true"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-macos-aarch64-no-viewer:
needs: [check-version, create-release, mcp-fs-macos-aarch64-no-viewer]
if: needs.check-version.outputs.should-release == 'true'
runs-on: macos-14
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: aarch64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-macos-aarch64-no-viewer
asset: objectiveai-macos-aarch64-no-viewer
src_name: objectiveai
install_args: "--no-viewer"
viewer: "false"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-windows-x86_64:
needs: [check-version, create-release, mcp-fs-windows-x86_64]
if: needs.check-version.outputs.should-release == 'true'
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: x86_64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-windows-x86_64
asset: objectiveai-windows-x86_64.exe
src_name: objectiveai.exe
install_args: ""
viewer: "true"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}
cli-windows-x86_64-no-viewer:
needs: [check-version, create-release, mcp-fs-windows-x86_64-no-viewer]
if: needs.check-version.outputs.should-release == 'true'
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-cli-leg
with:
mcp_target: x86_64-unknown-linux-musl
mcp_artifact_name: mcp-filesystem-windows-x86_64-no-viewer
asset: objectiveai-windows-x86_64-no-viewer.exe
src_name: objectiveai.exe
install_args: "--no-viewer"
viewer: "false"
version: ${{ needs.check-version.outputs.version }}
repository: ${{ github.repository }}