Merge pull request #372 from czlonkowski/fix/sync-package-runtime-version-2.22.3

fix: resolve release workflow YAML parsing errors with script-based approach
This commit is contained in:
Romuald Członkowski
2025-10-25 21:23:10 +02:00
committed by GitHub
2 changed files with 52 additions and 13 deletions

View File

@@ -142,19 +142,13 @@ jobs:
if [ -z "$PREVIOUS_TAG" ]; then if [ -z "$PREVIOUS_TAG" ]; then
echo " No previous tag found, this might be the first release" echo " No previous tag found, this might be the first release"
# Get all commits up to current commit - use heredoc for multiline # Generate initial release notes using script
NOTES=$(cat <<EOF if NOTES=$(node scripts/generate-initial-release-notes.js "$CURRENT_VERSION" 2>/dev/null); then
### Initial Release echo "✅ Successfully generated initial release notes for version $CURRENT_VERSION"
else
This is the initial release of n8n-mcp v$CURRENT_VERSION. echo "⚠️ Could not generate initial release notes for version $CURRENT_VERSION"
NOTES="Initial release v$CURRENT_VERSION"
--- fi
**Release Statistics:**
- Commit count: $(git rev-list --count HEAD)
- First release setup
EOF
)
echo "has-notes=true" >> $GITHUB_OUTPUT echo "has-notes=true" >> $GITHUB_OUTPUT

View File

@@ -0,0 +1,45 @@
#!/usr/bin/env node
/**
* Generate release notes for the initial release
* Used by GitHub Actions when no previous tag exists
*/
const { execSync } = require('child_process');
function generateInitialReleaseNotes(version) {
try {
// Get total commit count
const commitCount = execSync('git rev-list --count HEAD', { encoding: 'utf8' }).trim();
// Generate release notes
const releaseNotes = [
'### 🎉 Initial Release',
'',
`This is the initial release of n8n-mcp v${version}.`,
'',
'---',
'',
'**Release Statistics:**',
`- Commit count: ${commitCount}`,
'- First release setup'
];
return releaseNotes.join('\n');
} catch (error) {
console.error(`Error generating initial release notes: ${error.message}`);
return `Failed to generate initial release notes: ${error.message}`;
}
}
// Parse command line arguments
const version = process.argv[2];
if (!version) {
console.error('Usage: generate-initial-release-notes.js <version>');
process.exit(1);
}
const releaseNotes = generateInitialReleaseNotes(version);
console.log(releaseNotes);