This repository was archived by the owner on May 7, 2026. It is now read-only.
fix(release): keep rewritten workspace deps in registry metadata #8
Workflow file for this run
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 to npm | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Validate tag matches core / server / testkit versions | |
| id: version | |
| shell: bash | |
| run: | | |
| CORE_VERSION="$(node -p "require('./package.json').version")" | |
| SERVER_VERSION="$(node -p "require('./server/package.json').version")" | |
| TESTKIT_VERSION="$(node -p "require('./testkit/package.json').version")" | |
| POSTGRES_VERSION="$(node -p "require('./adapters/postgres/package.json').version")" | |
| MEMORY_VERSION="$(node -p "require('./adapters/memory/package.json').version")" | |
| if [[ "${GITHUB_REF_NAME}" != "v${CORE_VERSION}" ]]; then | |
| echo "Tag ${GITHUB_REF_NAME} does not match core version v${CORE_VERSION}" >&2 | |
| exit 1 | |
| fi | |
| if [[ "${SERVER_VERSION}" != "${CORE_VERSION}" ]]; then | |
| echo "server version (${SERVER_VERSION}) must match core version (${CORE_VERSION})" >&2 | |
| exit 1 | |
| fi | |
| if [[ "${TESTKIT_VERSION}" != "${CORE_VERSION}" ]]; then | |
| echo "testkit version (${TESTKIT_VERSION}) must match core version (${CORE_VERSION})" >&2 | |
| exit 1 | |
| fi | |
| echo "package_version=${CORE_VERSION}" >> "${GITHUB_OUTPUT}" | |
| echo "postgres_version=${POSTGRES_VERSION}" >> "${GITHUB_OUTPUT}" | |
| echo "memory_version=${MEMORY_VERSION}" >> "${GITHUB_OUTPUT}" | |
| - name: Build core (required before server/testkit typecheck) | |
| run: npm run build | |
| - name: Check (all workspaces) | |
| run: npm run check | |
| - name: Build server + testkit + postgres + memory (required before tests that import testkit) | |
| run: npm run build:server && npm run build:testkit && npm run build:postgres && npm run build:memory | |
| - name: Test (all workspaces) | |
| run: npm run test:all | |
| - name: Pack core | |
| id: pack_core | |
| shell: bash | |
| run: | | |
| PACKAGE_TGZ="$(npm pack --silent | tail -n 1)" | |
| echo "package_tgz=${PACKAGE_TGZ}" >> "${GITHUB_OUTPUT}" | |
| - name: Pack server | |
| id: pack_server | |
| shell: bash | |
| working-directory: server | |
| run: | | |
| PACKAGE_TGZ="$(npm pack --silent | tail -n 1)" | |
| echo "package_tgz=server/${PACKAGE_TGZ}" >> "${GITHUB_OUTPUT}" | |
| - name: Pack testkit | |
| id: pack_testkit | |
| shell: bash | |
| working-directory: testkit | |
| run: | | |
| PACKAGE_TGZ="$(npm pack --silent | tail -n 1)" | |
| echo "package_tgz=testkit/${PACKAGE_TGZ}" >> "${GITHUB_OUTPUT}" | |
| - name: Pack postgres adapter | |
| id: pack_postgres | |
| shell: bash | |
| working-directory: adapters/postgres | |
| run: | | |
| PACKAGE_TGZ="$(npm pack --silent | tail -n 1)" | |
| echo "package_tgz=adapters/postgres/${PACKAGE_TGZ}" >> "${GITHUB_OUTPUT}" | |
| - name: Pack memory adapter | |
| id: pack_memory | |
| shell: bash | |
| working-directory: adapters/memory | |
| run: | | |
| PACKAGE_TGZ="$(npm pack --silent | tail -n 1)" | |
| echo "package_tgz=adapters/memory/${PACKAGE_TGZ}" >> "${GITHUB_OUTPUT}" | |
| - name: Publish core to npm (skip if version already published) | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| PACKAGE_VERSION: ${{ steps.version.outputs.package_version }} | |
| shell: bash | |
| run: | | |
| if [[ -n "$(npm view @razroo/parallel-mcp@${PACKAGE_VERSION} version 2>/dev/null)" ]]; then | |
| echo "@razroo/parallel-mcp@${PACKAGE_VERSION} already on npm — skipping" | |
| exit 0 | |
| fi | |
| npm publish --access public --provenance | |
| - name: Publish server to npm (skip if version already published) | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| PACKAGE_VERSION: ${{ steps.version.outputs.package_version }} | |
| working-directory: server | |
| shell: bash | |
| run: | | |
| if [[ -n "$(npm view @razroo/parallel-mcp-server@${PACKAGE_VERSION} version 2>/dev/null)" ]]; then | |
| echo "@razroo/parallel-mcp-server@${PACKAGE_VERSION} already on npm — skipping" | |
| exit 0 | |
| fi | |
| npm publish --access public --provenance | |
| - name: Publish testkit to npm (skip if version already published) | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| PACKAGE_VERSION: ${{ steps.version.outputs.package_version }} | |
| working-directory: testkit | |
| shell: bash | |
| run: | | |
| if [[ -n "$(npm view @razroo/parallel-mcp-testkit@${PACKAGE_VERSION} version 2>/dev/null)" ]]; then | |
| echo "@razroo/parallel-mcp-testkit@${PACKAGE_VERSION} already on npm — skipping" | |
| exit 0 | |
| fi | |
| npm publish --access public --provenance | |
| - name: Publish postgres adapter to npm (skip if version already published) | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| POSTGRES_VERSION: ${{ steps.version.outputs.postgres_version }} | |
| working-directory: adapters/postgres | |
| shell: bash | |
| run: | | |
| if [[ -n "$(npm view @razroo/parallel-mcp-postgres@${POSTGRES_VERSION} version 2>/dev/null)" ]]; then | |
| echo "@razroo/parallel-mcp-postgres@${POSTGRES_VERSION} already on npm — skipping" | |
| exit 0 | |
| fi | |
| npm publish --access public --provenance | |
| - name: Publish memory adapter to npm (skip if version already published) | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| MEMORY_VERSION: ${{ steps.version.outputs.memory_version }} | |
| working-directory: adapters/memory | |
| shell: bash | |
| run: | | |
| if [[ -n "$(npm view @razroo/parallel-mcp-memory@${MEMORY_VERSION} version 2>/dev/null)" ]]; then | |
| echo "@razroo/parallel-mcp-memory@${MEMORY_VERSION} already on npm — skipping" | |
| exit 0 | |
| fi | |
| npm publish --access public --provenance | |
| - name: Create or update GitHub release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| shell: bash | |
| run: | | |
| if gh release view "${GITHUB_REF_NAME}" >/dev/null 2>&1; then | |
| echo "Release ${GITHUB_REF_NAME} exists — uploading assets with --clobber" | |
| gh release upload "${GITHUB_REF_NAME}" \ | |
| "${{ steps.pack_core.outputs.package_tgz }}" \ | |
| "${{ steps.pack_server.outputs.package_tgz }}" \ | |
| "${{ steps.pack_testkit.outputs.package_tgz }}" \ | |
| "${{ steps.pack_postgres.outputs.package_tgz }}" \ | |
| "${{ steps.pack_memory.outputs.package_tgz }}" \ | |
| --clobber | |
| else | |
| gh release create "${GITHUB_REF_NAME}" \ | |
| "${{ steps.pack_core.outputs.package_tgz }}" \ | |
| "${{ steps.pack_server.outputs.package_tgz }}" \ | |
| "${{ steps.pack_testkit.outputs.package_tgz }}" \ | |
| "${{ steps.pack_postgres.outputs.package_tgz }}" \ | |
| "${{ steps.pack_memory.outputs.package_tgz }}" \ | |
| --generate-notes | |
| fi |