Skip to content

Conversation

@ChengJiale150
Copy link
Contributor

See in #104

@ChengJiale150
Copy link
Contributor Author

🚀 Jupyter MCP Server Release Guide

This document provides detailed instructions on how to release the Jupyter MCP Server project using GitHub Actions.

📋 Release Process Overview

The release process is defined in the .github/workflows/release.yml file and includes the following automated steps:

  1. Python Package Build - Build distribution packages (wheel and source distribution)
  2. PyPI Publishing - Automatically publish to PyPI (using OIDC trusted publishing)
  3. Docker Image Build - Build multi-platform Docker images
  4. GitHub Release Creation - Automatically generate release notes (simplified version, without automatic changelog)

🔖 Version Management

Semantic Versioning

The project uses semantic versioning format: v{major}.{minor}.{patch}

Examples:

  • v1.0.0 - Major version update
  • v1.1.0 - Minor feature update
  • v1.1.1 - Patch and bug fixes

Version Tags

For releases, you need to push Git tags with version numbers:

# Create and push version tag
git tag v1.0.0
git push origin v1.0.0

⚙️ Release Workflow Trigger Conditions

The workflow is automatically triggered when:

  • Pushing Git tags in the format v*.*.* (e.g., v1.0.0, v2.1.3)

Configuration Steps:

  1. Configure Trusted Publisher in PyPI project settings

  2. GitHub repository settings

    • Settings → Environments → New environment: pypi
    • Configure protection rules (optional):
      • Required reviewers (requires approval)
      • Branch protection (only allows main branch)

Creating access token in Docker Hub:

  • Settings → Security → Access Tokens
  • Create restricted token (read/write only specific repository)
  • Store as GitHub Secret:
    • DOCKERHUB_USERNAME - Docker Hub username
    • DOCKERHUB_TOKEN - Docker Hub access token

GitHub Release

  • Uses built-in GITHUB_TOKEN, no additional configuration required

📦 Release Artifacts

Python Package

  • PyPI: https://pypi.org/project/jupyter-mcp-server/
  • Formats: wheel (.whl) and source distribution (.tar.gz)

Docker Image

  • Repository: datalayer/jupyter-mcp-server
  • Tags:
    • latest - Latest stable version
    • {version} - Specific version number (e.g., 1.0.0)

🔄 Release Steps

  1. Update Version Number

    # Edit version file
    vim jupyter_mcp_server/__version__.py
  2. Create Release Tag

    git tag v1.0.0
    git push origin v1.0.0
  3. Monitor Release Progress

    • Go to GitHub Actions page to view workflow run status
    • Check if PyPI has been updated
    • Verify Docker Hub has new images

🔄 Version Rollback

If serious issues occur during release:

  1. Delete GitHub Release (if created)
  2. Delete package from PyPI (if published) - Requires admin privileges
  3. Delete Docker image tags from Docker Hub
  4. Push new tag to re-release

@ChengJiale150
Copy link
Contributor Author

@echarles Try with following code for test:

git tag v0.16.0-test.1
git push origin v0.16.0-test.1

Copy link
Member

@echarles echarles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thx @ChengJiale150

@echarles echarles merged commit 7c652e7 into datalayer:main Oct 14, 2025
@echarles
Copy link
Member

@ChengJiale150 I have create the DOCKER secrets and configured pypi trusted published. I have just run

git tag v0.16.0-test.2
git push origin v0.16.0-test.2

Pypi publication works, but docker is failing https://github.com/datalayer/jupyter-mcp-server/actions/runs/18490491284/job/52682714080

260.7     data = self._decompressor.decompress(data, n)
260.7 zlib.error: Error -3 while decompressing data: invalid distance too far back
262.0 
Notice: 262.0 [notice] A new release of pip is available: 23.0.1 -> 25.2
Notice: 262.0 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:13
--------------------
  12 |     
  13 | >>> RUN pip install --no-cache-dir -e . && \
  14 | >>>     pip uninstall -y pycrdt datalayer_pycrdt && \
  15 | >>>     pip install --no-cache-dir datalayer_pycrdt==0.12.17
  16 |     
--------------------
ERROR: failed to build: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c pip install --no-cache-dir -e . &&     pip uninstall -y pycrdt datalayer_pycrdt &&     pip install --no-cache-dir datalayer_pycrdt==0.12.17" did not complete successfully: exit code: 2
Error: buildx failed with: ERROR: failed to build: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c pip install --no-cache-dir -e . &&     pip uninstall -y pycrdt datalayer_pycrdt &&     pip install --no-cache-dir datalayer_pycrdt==0.12.17" did not complete successfully: exit code: 2

@echarles
Copy link
Member

the command we use to build the docker image locally is in the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants