Skip to content

Commit 4cdc2dc

Browse files
committed
feat(release): auto-publish npm and PyPI wrappers
Add publish-registries job to release.yml that runs after verify (release published, VirusTotal table appended). Publishes: - pkg/npm via 'npm publish --access public --provenance' - pkg/pypi via 'twine upload' (sdist + wheel from hatchling) Both wrappers fetch the binary at install time, so a version bump is the only per-release change needed. Bumped to 0.6.1. Requires NPM_TOKEN and PYPI_TOKEN repo secrets.
1 parent 72c5bdb commit 4cdc2dc

3 files changed

Lines changed: 47 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,48 @@ jobs:
256256
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
257257
VERSION: ${{ inputs.version }}
258258
run: gh release edit "$VERSION" --draft=false --repo "$GITHUB_REPOSITORY"
259+
260+
# ── 8. Publish package wrappers (npm + PyPI) ──────────────────
261+
# Wrappers in pkg/npm and pkg/pypi download the released binary at
262+
# install time, so they only need a version bump (already in the repo
263+
# at this point) — no per-release sha256 substitution.
264+
publish-registries:
265+
needs: [verify]
266+
runs-on: ubuntu-latest
267+
permissions:
268+
contents: read
269+
id-token: write # for npm provenance
270+
steps:
271+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
272+
273+
# ── npm ──────────────────────────────────────────────────
274+
- name: Setup Node
275+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v6.4.0
276+
with:
277+
node-version: '22'
278+
registry-url: 'https://registry.npmjs.org'
279+
280+
- name: Publish to npm
281+
working-directory: pkg/npm
282+
env:
283+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
284+
run: npm publish --access public --provenance
285+
286+
# ── PyPI ─────────────────────────────────────────────────
287+
- name: Setup Python
288+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
289+
with:
290+
python-version: '3.12'
291+
292+
- name: Build PyPI distribution
293+
working-directory: pkg/pypi
294+
run: |
295+
python -m pip install --upgrade build twine
296+
python -m build
297+
298+
- name: Publish to PyPI
299+
working-directory: pkg/pypi
300+
env:
301+
TWINE_USERNAME: __token__
302+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
303+
run: twine upload --non-interactive dist/*

pkg/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codebase-memory-mcp",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Fast code intelligence engine for AI coding agents — single static binary MCP server",
55
"license": "MIT",
66
"repository": {

pkg/pypi/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "codebase-memory-mcp"
7-
version = "0.6.0"
7+
version = "0.6.1"
88
description = "Fast code intelligence engine for AI coding agents — single static binary MCP server"
99
readme = "README.md"
1010
license = { text = "MIT" }

0 commit comments

Comments
 (0)