mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
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:
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@@ -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
|
||||||
|
|
||||||
|
|||||||
45
scripts/generate-initial-release-notes.js
Normal file
45
scripts/generate-initial-release-notes.js
Normal 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);
|
||||||
Reference in New Issue
Block a user