Skip to content

Commit 58ca7f3

Browse files
committed
Adding build_version to the manifest
1 parent 0ceb1d5 commit 58ca7f3

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/build-release.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ jobs:
3737
- name: Install dependencies
3838
run: npm install
3939

40-
- name: Build markdown documentation
41-
run: npm run build:docs
42-
43-
- name: List build artifacts
44-
run: ls -lh dist/
45-
4640
- name: Determine version
4741
id: version
4842
run: |
@@ -107,6 +101,14 @@ jobs:
107101
echo "tag=v${VERSION}" >> $GITHUB_OUTPUT
108102
echo "Building version: ${VERSION}"
109103
104+
- name: Build markdown documentation
105+
run: npm run build:docs
106+
env:
107+
BUILD_VERSION: ${{ steps.version.outputs.version }}
108+
109+
- name: List build artifacts
110+
run: ls -lh dist/
111+
110112
- name: Create Release
111113
id: create_release
112114
uses: actions/create-release@v1
@@ -157,5 +159,10 @@ jobs:
157159
echo "- **Tag:** ${{ steps.version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
158160
echo "- **Artifact:** examples-mcp-resources.zip" >> $GITHUB_STEP_SUMMARY
159161
echo "" >> $GITHUB_STEP_SUMMARY
162+
echo "### Manifest Metadata" >> $GITHUB_STEP_SUMMARY
163+
echo '```json' >> $GITHUB_STEP_SUMMARY
164+
cat dist/manifest.json | jq '{version, buildVersion, buildTimestamp}' >> $GITHUB_STEP_SUMMARY
165+
echo '```' >> $GITHUB_STEP_SUMMARY
166+
echo "" >> $GITHUB_STEP_SUMMARY
160167
echo "### Files Generated" >> $GITHUB_STEP_SUMMARY
161168
ls -lh dist/ >> $GITHUB_STEP_SUMMARY

scripts/build-examples-mcp-resources.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ const { composePlugins, ignoreLinePlugin, ignoreFilePlugin, ignoreBlockPlugin }
2626

2727
/**
2828
* Manifest configuration constants
29+
*
30+
* - MANIFEST_VERSION: Schema version for manifest structure
31+
* - BUILD_VERSION: Git release version (set by CI, defaults to 'dev' locally)
32+
* - URI_SCHEME: Base scheme for all resource URIs
2933
*/
3034
const MANIFEST_VERSION = '1.0';
35+
const BUILD_VERSION = process.env.BUILD_VERSION || 'dev';
3136
const URI_SCHEME = 'posthog://';
3237

3338
/**
@@ -637,6 +642,8 @@ function generateManifest(discoveredWorkflows, exampleIds, discoveredPrompts) {
637642

638643
return {
639644
version: MANIFEST_VERSION,
645+
buildVersion: BUILD_VERSION,
646+
buildTimestamp: new Date().toISOString(),
640647
resources: {
641648
workflows,
642649
docs,
@@ -696,7 +703,9 @@ function processWorkflowFiles(discoveredWorkflows, outputDir) {
696703
* 5. Create ZIP archive
697704
*/
698705
async function build() {
699-
console.log('Building markdown documentation from example projects...\n');
706+
console.log('Building markdown documentation from example projects...');
707+
console.log(`Build Version: ${BUILD_VERSION}`);
708+
console.log('');
700709

701710
const outputDir = path.join(__dirname, '..', 'dist');
702711

0 commit comments

Comments
 (0)