Skip to content

Implement CI/CD Pipeline with GitHub Actions #6

Description

@alioshr

Is your feature request related to a problem? Please describe.
Currently, there is no automated process for testing, building, and publishing the memory-bank-mcp package. This makes it difficult to ensure code quality and streamline releases. Manual publishing can lead to inconsistencies and potential errors.

Describe the solution you'd like
Implement a GitHub Actions workflow that automates:

  1. Testing and validation
  2. Package building
  3. npm publishing
  4. GitHub release creation

The workflow should trigger on:

  • Push to main branch (full pipeline including publish)
  • Pull requests (testing and validation only)

Describe alternatives you've considered

  1. CircleCI - But GitHub Actions is free for public repos and better integrated
  2. Manual release process - Too error-prone and time-consuming
  3. Local scripts - Lacks consistency across different environments

Memory Bank Impact

  • Project isolation/security:

    • No impact on project isolation
    • Requires secure handling of npm tokens
    • Maintains existing security measures
  • Memory bank file structure:

    • Adds .github/workflows directory
    • No changes to core memory bank structure
    • No impact on existing file operations
  • MCP tool interactions:

    • No changes to MCP protocol
    • No impact on existing tools
    • Enhances reliability of the package
  • User workflow:

    • Simplifies contribution process
    • Automates version management
    • Standardizes release process
  • Configuration requirements:

    • Requires npm token as GitHub secret
    • No changes to existing env variables
    • No impact on user configuration

Additional context
The workflow will use GitHub's standard runners:

  • Ubuntu latest for build/test
  • Node.js 18.x environment
  • Standard npm commands

Example Usage

# Example GitHub Actions workflow
name: CI/CD

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '18'
      - run: npm ci
      - run: npm test

  publish:
    needs: test
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '18'
          registry-url: 'https://registry.npmjs.org'
      - run: npm ci
      - run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions