Skip to content

Cascade-delete referential integrity + multi-select tree commands (#31) #24

Cascade-delete referential integrity + multi-select tree commands (#31)

Cascade-delete referential integrity + multi-select tree commands (#31) #24

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
build-mcp:
name: Build npm Packages
runs-on: ubuntu-latest
environment: NPM Deployment
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: too-many-cooks/package-lock.json
- name: Upgrade npm to >= 11.5 (Trusted Publisher OIDC auth)
run: npm install -g npm@latest
- name: Install dependencies
working-directory: too-many-cooks
run: npm ci
- name: Build all packages
working-directory: too-many-cooks
run: npm run build
- name: Verify server binary
run: |
set -e
test -f too-many-cooks/packages/too-many-cooks/build/bin/server.js || (echo "Server build failed!" && exit 1)
echo "MCP server built successfully"
- name: Verify core build
run: |
set -e
test -f too-many-cooks/packages/core/build/index.js || (echo "Core build failed!" && exit 1)
echo "Core package built successfully"
- name: Set version and npm tag from git tag
id: version
run: |
VERSION="${GITHUB_REF_NAME#v}"
NPM_TAG=latest
if [[ "$VERSION" == *-* ]]; then NPM_TAG=beta; fi
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "NPM_TAG=$NPM_TAG" >> "$GITHUB_OUTPUT"
- name: Stamp versions for publishing
run: |
VERSION=${{ steps.version.outputs.VERSION }}
cd too-many-cooks/packages/core
npm version "$VERSION" --no-git-tag-version --allow-same-version
cd ../too-many-cooks
npm version "$VERSION" --no-git-tag-version --allow-same-version
sed -i "s/\"too-many-cooks-core\": \"\\*\"/\"too-many-cooks-core\": \"^$VERSION\"/" package.json
- name: Publish too-many-cooks-core to npm
working-directory: too-many-cooks/packages/core
run: npm publish --tag ${{ steps.version.outputs.NPM_TAG }} --provenance --access public
- name: Publish too-many-cooks to npm
working-directory: too-many-cooks/packages/too-many-cooks
run: npm publish --tag ${{ steps.version.outputs.NPM_TAG }} --provenance --access public
- name: Pack core tarball
working-directory: too-many-cooks/packages/core
run: npm pack
- name: Pack MCP server tarball
working-directory: too-many-cooks/packages/too-many-cooks
run: npm pack
- name: Upload npm tarballs as release assets
uses: softprops/action-gh-release@v2
with:
files: |
too-many-cooks/packages/core/too-many-cooks-core-${{ steps.version.outputs.VERSION }}.tgz
too-many-cooks/packages/too-many-cooks/too-many-cooks-${{ steps.version.outputs.VERSION }}.tgz
name: Too Many Cooks ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
build-vsix:
name: Build VSCode Extension
runs-on: ubuntu-latest
needs: build-mcp
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: too_many_cooks_vscode_extension/package-lock.json
- name: Build MCP server
working-directory: too-many-cooks
run: |
npm ci
npm run build
- name: Install extension dependencies
working-directory: too_many_cooks_vscode_extension
run: npm ci
- name: Set version from tag
id: version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Package VSCode extension
working-directory: too_many_cooks_vscode_extension
run: |
npm version ${{ steps.version.outputs.VERSION }} --no-git-tag-version --allow-same-version
npx vsce package --no-git-tag-version ${{ steps.version.outputs.VERSION }}
- name: Publish VSIX to VS Code Marketplace
working-directory: too_many_cooks_vscode_extension
env:
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }}
run: |
if [ -z "$VSCE_PAT" ]; then
echo "::error::VSCODE_MARKETPLACE_PAT not accessible. If it exists at the Nimblesite org level, add too-many-cooks to its allowed repositories under Org Settings → Secrets and variables → Actions."
exit 1
fi
npx --yes @vscode/vsce publish --packagePath too-many-cooks-${{ steps.version.outputs.VERSION }}.vsix
- name: Upload VSIX as release asset
uses: softprops/action-gh-release@v2
with:
files: too_many_cooks_vscode_extension/too-many-cooks-${{ steps.version.outputs.VERSION }}.vsix
name: Too Many Cooks ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
deploy-website:
name: Deploy Website to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: website/package-lock.json
- name: Install website dependencies
working-directory: website
run: npm ci
- name: Build website
working-directory: website
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/_site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4