|
| 1 | +name: Create Release |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + version: |
| 7 | + description: 'Release version (e.g., 0.10.1)' |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + prerelease: |
| 11 | + description: 'Mark as pre-release' |
| 12 | + required: false |
| 13 | + type: boolean |
| 14 | + default: false |
| 15 | + |
| 16 | +jobs: |
| 17 | + create-release: |
| 18 | + name: Create GitHub Release |
| 19 | + runs-on: ubuntu-latest |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Checkout code |
| 23 | + uses: actions/checkout@v4 |
| 24 | + with: |
| 25 | + fetch-depth: 0 |
| 26 | + |
| 27 | + - name: Setup Node.js |
| 28 | + uses: actions/setup-node@v4 |
| 29 | + with: |
| 30 | + node-version: '18' |
| 31 | + cache: 'npm' |
| 32 | + |
| 33 | + - name: Validate version format |
| 34 | + run: | |
| 35 | + VERSION="${{ github.event.inputs.version }}" |
| 36 | + if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then |
| 37 | + echo "❌ Invalid version format: $VERSION" |
| 38 | + echo "Expected format: X.Y.Z or X.Y.Z-prerelease" |
| 39 | + exit 1 |
| 40 | + fi |
| 41 | + echo "✅ Version format is valid: $VERSION" |
| 42 | +
|
| 43 | + - name: Check if version matches package.json |
| 44 | + run: | |
| 45 | + PACKAGE_VERSION=$(node -p "require('./package.json').version") |
| 46 | + INPUT_VERSION="${{ github.event.inputs.version }}" |
| 47 | + |
| 48 | + if [ "$PACKAGE_VERSION" != "$INPUT_VERSION" ]; then |
| 49 | + echo "❌ Version mismatch!" |
| 50 | + echo "package.json version: $PACKAGE_VERSION" |
| 51 | + echo "Input version: $INPUT_VERSION" |
| 52 | + echo "Please update package.json version to match the release version." |
| 53 | + exit 1 |
| 54 | + fi |
| 55 | + echo "✅ Version matches package.json: $PACKAGE_VERSION" |
| 56 | +
|
| 57 | + - name: Install dependencies and run tests |
| 58 | + run: | |
| 59 | + npm ci |
| 60 | + npm test |
| 61 | + npm run build |
| 62 | +
|
| 63 | + - name: Generate release notes |
| 64 | + id: release_notes |
| 65 | + run: | |
| 66 | + VERSION="${{ github.event.inputs.version }}" |
| 67 | + |
| 68 | + # Get the latest tag for comparison |
| 69 | + LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") |
| 70 | + |
| 71 | + cat > release_notes.md << 'EOF' |
| 72 | + # 🚀 n8n-workflow-builder v${{ github.event.inputs.version }} |
| 73 | + |
| 74 | + ## 🎯 What's New in v${{ github.event.inputs.version }} |
| 75 | + |
| 76 | + ### ⚡ Major Upgrades |
| 77 | + - **MCP SDK 1.17.0 Compatibility**: Fully upgraded to the latest Model Context Protocol SDK |
| 78 | + - **TypeScript 5.7.3**: Latest TypeScript with enhanced type safety and performance |
| 79 | + - **Modern Jest Testing**: Comprehensive test suite with ts-jest integration |
| 80 | + |
| 81 | + ### 🛠️ New MCP Tools (23 Total) |
| 82 | + - `execute_workflow` - Execute n8n workflows programmatically |
| 83 | + - `create_workflow_and_activate` - Create and immediately activate workflows |
| 84 | + - `generate_audit` - Generate comprehensive security audit reports |
| 85 | + - **Credential Management**: `create_credential`, `get_credential_schema`, `delete_credential` |
| 86 | + - **Tag Management**: `list_tags`, `create_tag`, `get_tag`, `update_tag`, `delete_tag`, `get_workflow_tags`, `update_workflow_tags` |
| 87 | + |
| 88 | + ### 🧪 Testing Excellence |
| 89 | + - **78 Comprehensive Tests** covering all 23 MCP tools |
| 90 | + - **7 Test Suites** with integration and unit testing |
| 91 | + - **Mock Client Framework** for reliable testing |
| 92 | + - **Error Handling Tests** for robust error scenarios |
| 93 | + - **TypeScript Strict Mode** with full type safety |
| 94 | + |
| 95 | + ### 🏗️ Repository Modernization |
| 96 | + - **Clean Git History**: Removed accidentally committed `node_modules` |
| 97 | + - **Comprehensive .gitignore**: Node.js best practices implementation |
| 98 | + - **GitHub Actions CI/CD**: Automated testing and npm publishing |
| 99 | + - **Package Optimization**: Proper npm package configuration |
| 100 | + |
| 101 | + ### 📦 Installation & Usage |
| 102 | + |
| 103 | + ```bash |
| 104 | + # Install via npm |
| 105 | + npm install @makafeli/n8n-workflow-builder |
| 106 | + |
| 107 | + # Use as MCP server |
| 108 | + npx @makafeli/n8n-workflow-builder |
| 109 | + ``` |
| 110 | + |
| 111 | + ### 🔧 Technical Specifications |
| 112 | + - **Node.js**: >=18.0.0 |
| 113 | + - **MCP SDK**: ^1.17.0 |
| 114 | + - **TypeScript**: ^5.7.3 |
| 115 | + - **Testing**: Jest with ts-jest |
| 116 | + - **Package Size**: Optimized for production |
| 117 | + |
| 118 | + ### 🐛 Bug Fixes & Improvements |
| 119 | + - Fixed TypeScript configuration issues |
| 120 | + - Resolved MCP SDK compatibility problems |
| 121 | + - Enhanced error handling and validation |
| 122 | + - Improved test reliability and coverage |
| 123 | + - Optimized build process and package size |
| 124 | + |
| 125 | + ### 📚 Documentation |
| 126 | + - Updated README with latest features |
| 127 | + - Comprehensive API documentation |
| 128 | + - Testing guidelines and examples |
| 129 | + - Contributing guidelines |
| 130 | + |
| 131 | + --- |
| 132 | + |
| 133 | + **Full Changelog**: https://github.com/makafeli/n8n-workflow-builder/compare/v0.9.0...v${{ github.event.inputs.version }} |
| 134 | + |
| 135 | + **NPM Package**: https://www.npmjs.com/package/@makafeli/n8n-workflow-builder |
| 136 | + EOF |
| 137 | + |
| 138 | + echo "release_notes_file=release_notes.md" >> $GITHUB_OUTPUT |
| 139 | +
|
| 140 | + - name: Create Git tag |
| 141 | + run: | |
| 142 | + VERSION="v${{ github.event.inputs.version }}" |
| 143 | + git config user.name "github-actions[bot]" |
| 144 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 145 | + git tag -a "$VERSION" -m "Release $VERSION" |
| 146 | + git push origin "$VERSION" |
| 147 | +
|
| 148 | + - name: Create GitHub Release |
| 149 | + uses: actions/create-release@v1 |
| 150 | + env: |
| 151 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 152 | + with: |
| 153 | + tag_name: v${{ github.event.inputs.version }} |
| 154 | + release_name: n8n-workflow-builder v${{ github.event.inputs.version }} |
| 155 | + body_path: release_notes.md |
| 156 | + draft: false |
| 157 | + prerelease: ${{ github.event.inputs.prerelease }} |
| 158 | + |
| 159 | + - name: Create release summary |
| 160 | + run: | |
| 161 | + echo "## 🎉 Release Created Successfully!" >> $GITHUB_STEP_SUMMARY |
| 162 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 163 | + echo "**Version:** v${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY |
| 164 | + echo "**Tag:** v${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY |
| 165 | + echo "**Pre-release:** ${{ github.event.inputs.prerelease }}" >> $GITHUB_STEP_SUMMARY |
| 166 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 167 | + echo "### 📦 Next Steps" >> $GITHUB_STEP_SUMMARY |
| 168 | + echo "1. The release will automatically trigger npm publishing" >> $GITHUB_STEP_SUMMARY |
| 169 | + echo "2. Package will be available at: https://www.npmjs.com/package/@makafeli/n8n-workflow-builder" >> $GITHUB_STEP_SUMMARY |
| 170 | + echo "3. Installation: \`npm install @makafeli/n8n-workflow-builder\`" >> $GITHUB_STEP_SUMMARY |
0 commit comments