Skip to content

Commit a09de40

Browse files
Merge pull request #8 from agentfront/pull-latest-changes-from-master
feat: streamline release workflow by updating release body preparation and removing outdated changelog updates
2 parents 25cce9a + c478519 commit a09de40

4 files changed

Lines changed: 61 additions & 251 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 58 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ jobs:
172172
script: |
173173
const fs = require('fs');
174174
const diff = fs.readFileSync('/tmp/diff.txt', 'utf8');
175-
const existingUpdates = fs.readFileSync('docs/vectoriadb/updates.mdx', 'utf8');
176175
const releaseDate = new Date().toISOString().split('T')[0];
177176
const version = process.env.VERSION;
178177
const versionNum = version.replace('v', '');
@@ -231,51 +230,18 @@ jobs:
231230
core.setOutput('changelog', result.changelog);
232231
core.setOutput('has_card_mdx', result.cardMdx ? 'true' : 'false');
233232
234-
- name: Update CHANGELOG.md
235-
if: ${{ inputs.dry_run != true && inputs.release_type == 'stable' && steps.ai_changelog.outputs.changelog }}
236-
run: |
237-
node -e "
238-
const fs = require('fs');
239-
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
240-
const newEntry = process.env.CHANGELOG_ENTRY;
241-
const lines = changelog.split('\n');
242-
const unreleasedIdx = lines.findIndex(l => l.startsWith('## [Unreleased]'));
243-
let insertIdx = unreleasedIdx + 1;
244-
while (insertIdx < lines.length && !lines[insertIdx].match(/^## \[\d/)) insertIdx++;
245-
if (lines[insertIdx - 1].trim() !== '') { lines.splice(insertIdx, 0, ''); insertIdx++; }
246-
lines.splice(insertIdx, 0, newEntry);
247-
fs.writeFileSync('CHANGELOG.md', lines.join('\n'));
248-
"
249-
env:
250-
CHANGELOG_ENTRY: ${{ steps.ai_changelog.outputs.changelog }}
251-
252-
- name: Update updates.mdx
253-
if: ${{ inputs.dry_run != true && inputs.release_type == 'stable' && steps.ai_changelog.outputs.has_card_mdx == 'true' }}
254-
run: |
255-
node scripts/update-docs-changelog.mjs \
256-
--version "v${{ steps.version.outputs.version }}" \
257-
--version-minor "${{ steps.context.outputs.release_line }}" \
258-
--card-mdx-file "/tmp/card-mdx.txt"
259-
260233
- name: Update package version
261234
if: ${{ inputs.dry_run != true }}
262235
run: |
263236
npx nx release version "${{ steps.version.outputs.version }}" \
264237
--projects=vectoriadb --git-tag=false --git-commit=false
265238
266-
- name: Commit version bump and docs
239+
- name: Commit version bump
267240
if: ${{ inputs.dry_run != true }}
268241
run: |
269242
if [ -n "$(git status --porcelain)" ]; then
270243
git add -A
271-
git commit -m "$(cat <<'EOF'
272-
chore(release): v${{ steps.version.outputs.version }}
273-
274-
- Bump version to ${{ steps.version.outputs.version }}
275-
- Update CHANGELOG.md
276-
- Update docs/vectoriadb/updates.mdx
277-
EOF
278-
)"
244+
git commit -m "chore(release): v${{ steps.version.outputs.version }}"
279245
git push origin HEAD
280246
fi
281247
@@ -315,28 +281,69 @@ jobs:
315281
316282
echo "Created and pushed tag: $TAG"
317283
284+
- name: Prepare release body
285+
id: release_body
286+
env:
287+
CHANGELOG: ${{ steps.ai_changelog.outputs.changelog }}
288+
run: |
289+
VERSION="${{ steps.version.outputs.version }}"
290+
RELEASE_TYPE="${{ steps.version.outputs.release_type }}"
291+
RELEASE_LINE="${{ steps.context.outputs.release_line }}"
292+
BRANCH="${{ steps.context.outputs.branch }}"
293+
IS_PRERELEASE="${{ steps.version.outputs.is_prerelease }}"
294+
295+
# Start building the release body
296+
{
297+
echo "## Release v${VERSION}"
298+
echo ""
299+
echo "**Release type:** ${RELEASE_TYPE}"
300+
echo "**Release line:** ${RELEASE_LINE}.x"
301+
echo "**Branch:** ${BRANCH}"
302+
} > /tmp/release-body.md
303+
304+
# Add AI-generated changelog if available
305+
if [ -f /tmp/card-mdx.txt ] && [ -s /tmp/card-mdx.txt ] && [ -n "$CHANGELOG" ]; then
306+
echo "" >> /tmp/release-body.md
307+
echo "$CHANGELOG" >> /tmp/release-body.md
308+
fi
309+
310+
# Add installation section
311+
{
312+
echo ""
313+
echo "### Installation"
314+
echo ""
315+
echo '```bash'
316+
echo "npm install vectoriadb@${VERSION}"
317+
echo '```'
318+
} >> /tmp/release-body.md
319+
320+
# Add pre-release note if applicable
321+
if [ "$IS_PRERELEASE" = "true" ]; then
322+
echo "" >> /tmp/release-body.md
323+
echo "> **Note:** This is a pre-release version." >> /tmp/release-body.md
324+
fi
325+
326+
# Add Card MDX as hidden comment for docs sync (only for stable releases)
327+
# NOTE: Content is sanitized to prevent --> from breaking the HTML comment.
328+
# Consumer must reverse: replace "--&gt;" with "-->" after extraction.
329+
if [ -f /tmp/card-mdx.txt ] && [ -s /tmp/card-mdx.txt ]; then
330+
echo "" >> /tmp/release-body.md
331+
echo "<!--" >> /tmp/release-body.md
332+
echo "CARD_MDX_START" >> /tmp/release-body.md
333+
sed 's/-->/--\&gt;/g' /tmp/card-mdx.txt >> /tmp/release-body.md
334+
echo "CARD_MDX_END" >> /tmp/release-body.md
335+
echo "-->" >> /tmp/release-body.md
336+
fi
337+
318338
- name: Create GitHub Release
319339
if: ${{ inputs.dry_run != true }}
320340
uses: softprops/action-gh-release@v2
321341
with:
322342
tag_name: v${{ steps.version.outputs.version }}
323343
name: v${{ steps.version.outputs.version }}
324344
prerelease: ${{ steps.version.outputs.is_prerelease }}
325-
generate_release_notes: true
326-
body: |
327-
## Release v${{ steps.version.outputs.version }}
328-
329-
**Release type:** ${{ steps.version.outputs.release_type }}
330-
**Release line:** ${{ steps.context.outputs.release_line }}.x
331-
**Branch:** ${{ steps.context.outputs.branch }}
332-
333-
### Installation
334-
335-
```bash
336-
npm install vectoriadb@${{ steps.version.outputs.version }}
337-
```
338-
339-
${{ steps.version.outputs.is_prerelease == 'true' && '> **Note:** This is a pre-release version.' || '' }}
345+
generate_release_notes: false
346+
body_path: /tmp/release-body.md
340347
env:
341348
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
342349

CHANGELOG.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

docs/vectoriadb/updates.mdx

Lines changed: 3 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,7 @@
11
---
2-
title: 'Updates'
2+
title: "Updates"
33
description: "Changelog and release history for VectoriaDB"
4-
slug: 'updates'
5-
icon: 'sparkles'
6-
mode: 'center'
4+
icon: "clock-rotate-left"
75
---
86

9-
<Update label="v2.1.x" description="January 2026" tags={["Releases"]}>
10-
<Card
11-
title="VectoriaDB v2.1.2: Documentation Enhancements"
12-
href="https://github.com/agentfront/vectoriadb/releases/tag/v2.1.2"
13-
cta="View full changelog"
14-
>
15-
**Feature** – Enhanced documentation layout.
16-
- Added updates section and icons for better user guidance.
17-
</Card>
18-
</Update>
19-
20-
21-
<Update label="v2.0.x" description="December 2025 - January 2026" tags={["Releases"]}>
22-
<Card
23-
title="VectoriaDB v2.0.2: Security hardening"
24-
href="https://github.com/agentfront/vectoriadb/releases/tag/v2.0.2"
25-
cta="View full changelog"
26-
>
27-
**ReDoS Vulnerability Fixes** – Hardened regex analyzer and namespace sanitizer against ReDoS attacks.
28-
- Regex vulnerability detection now trims analyzed patterns to 500 characters
29-
- Redis namespace sanitization bounds input prior to regex processing
30-
- Precompiled `SAFE_PATTERNS` used for deterministic string operations
31-
32-
<Warning>
33-
If you're using v2.0.0 or v2.0.1, upgrade to v2.0.2 immediately to patch security vulnerabilities.
34-
</Warning>
35-
</Card>
36-
37-
38-
39-
40-
```bash
41-
npm install @huggingface/transformers
42-
```
43-
44-
<Update label="v1.0.0" description="November 2025" tags={["Releases"]}>
45-
<Card
46-
title="VectoriaDB v1.0.0: Initial release"
47-
href="https://github.com/agentfront/vectoriadb/releases/tag/v1.0.0"
48-
cta="View full changelog"
49-
>
50-
**Initial Release** – Production-ready in-memory vector database for semantic search.
51-
52-
- **In-Memory Vector Database**: Fast semantic search using cosine similarity
53-
- **Offline Embeddings**: Local embedding generation via transformers.js
54-
- **Type-Safe Metadata**: TypeScript generics for compile-time safety
55-
- **HNSW Indexing**: Sub-millisecond queries for large datasets
56-
- **Storage Adapters**: File, Redis, and Memory adapters for persistence
57-
- **Namespace Support**: Multi-tenant isolation
58-
- **Operational Guardrails**: Rate limits, batch validation, document size limits
59-
- **Typed Error Classes**: Machine-readable error codes for programmatic handling
60-
</Card>
61-
</Update>
62-
63-
## GitHub Releases
64-
65-
For detailed release notes and download links, see the [GitHub Releases](https://github.com/agentfront/vectoriadb/releases) page.
66-
67-
## Related
68-
69-
<CardGroup cols={2}>
70-
<Card title="Installation" icon="download" href="/vectoriadb/get-started/installation">
71-
Get started with VectoriaDB
72-
</Card>
73-
<Card title="Migration Guide" icon="right-left" href="/vectoriadb/troubleshooting/faq">
74-
Common migration questions
75-
</Card>
76-
</CardGroup>
7+
{/* This file is auto-generated by docs sync from GitHub releases */}

scripts/update-docs-changelog.mjs

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)