This directory contains CI/CD workflows for the @daichi-kudo/mcp-memory-sqlite package.
workflows/ci.yml- Continuous Integration workflowworkflows/release.yml- Release and npm publishing workflowSETUP.md- Detailed setup instructionsPIPELINE_DIAGRAM.md- Visual pipeline diagrams
SETUP_COMMANDS.batbash SETUP_COMMANDS.shThis will:
- Install required development dependencies
- Update package.json with CI-friendly scripts
- Verify everything works locally
If you prefer to set up manually, follow these steps:
npm install -D \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
rimrafAdd these scripts to package.json:
{
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "eslint src --ext .ts && tsc --noEmit",
"test": "echo \"No tests yet\" && exit 0",
"test:ci": "npm run typecheck && npm run lint && npm run test",
"clean": "rimraf dist",
"prepublishOnly": "npm run clean && npm run build"
}
}- Generate token at https://www.npmjs.com/settings/[username]/tokens
- Choose "Automation" type
- Copy the token
- Add to GitHub repository:
- Settings β Secrets and variables β Actions
- New repository secret:
NPM_TOKEN
npm run typecheck # Should pass β
npm run lint # Should pass β
npm run build # Should create dist/ β
npm test # Should pass βgit add .
git commit -m "ci: add GitHub Actions workflows"
git push origin masterTriggers:
- Push to
mainordevelop - Pull requests to
mainordevelop
Jobs:
- Lint and type check
- Build package
- Test on multiple platforms (Ubuntu, Windows, macOS) with Node 20 & 22
- Verify build artifacts are committed
Duration: ~2-3 minutes
Triggers:
- GitHub release published
- Tags matching
v*pattern
Steps:
- Run full CI checks
- Build package
- Publish to npm with provenance
- Create release summary
Duration: ~3-5 minutes
git tag v1.0.0
git push origin v1.0.0- Go to repository β Releases β Draft a new release
- Choose tag: v1.0.0
- Add release notes:
## What's New
- Initial release
- SQLite-based MCP memory server
- WAL mode for concurrency
## Installation
npm install @daichi-kudo/mcp-memory-sqlite- Click "Publish release"
The workflow will automatically publish to npm! π
- Go to repository β Actions tab
- Click on a workflow run to see details
- Each job shows real-time logs
After release, verify at:
npm run typecheck # See errors locally
# Fix errors
npm run typecheck # Verify fixednpm run lint # See lint errors
npm run lint -- --fix # Auto-fixThe build-check job fails if committed dist/ doesn't match the build output.
Fix:
npm run clean
npm run build
git add dist/
git commit -m "chore: update build artifacts"
git pushCommon causes:
- NPM_TOKEN not set or invalid
- Package version already published
- Package name not available
- No publish permissions for
@daichi-kudoscope
Solutions:
- Verify NPM_TOKEN in GitHub secrets
- Bump version in package.json
- Check package availability on npm
- Verify npm scope access
The native module should rebuild automatically. If it fails:
- Check Node.js version compatibility
- Verify platform has build tools (CI runners have them)
- Check better-sqlite3 documentation for platform support
The CI workflow tests on 6 combinations:
| OS | Node 20 | Node 22 |
|---|---|---|
| Ubuntu | β | β |
| Windows | β | β |
| macOS | β | β |
This ensures the package works across all supported platforms.
The release workflow uses npm provenance, which:
- Cryptographically links the package to the source code
- Proves the package was built by GitHub Actions
- Prevents tampering between build and publish
- Improves supply chain security
- NPM_TOKEN is stored as a GitHub secret
- Never exposed in logs
- Can be rotated without code changes
- Scoped to publish permissions only
If you encounter issues:
- Check the Troubleshooting section
- Review workflow logs in the Actions tab
- Consult the detailed guides in this directory
- Open an issue on GitHub
Happy CI/CD! π