Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit 1603c83

Browse files
sapientpantsclaude
andauthored
fix: add build step before changeset versioning in CI (#169)
* fix: add build step before changeset versioning in ci - Build TypeScript before running changeset version command - Required for custom changelog generator (changelog-custom.js) - Clean build directory before final release build - Ensures SBOM reflects exact release artifacts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * chore: add changeset for ci build fix 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent b7ab8d4 commit 1603c83

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.changeset/fix-changeset-build.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'deepsource-mcp-server': patch
3+
---
4+
5+
fix: add build step before changeset versioning in ci
6+
7+
- Build TypeScript before running changeset version command to ensure custom changelog generator is available
8+
- Clean build directory before final release build to ensure SBOM reflects exact release artifacts
9+
- Fixes CI pipeline failure when using custom changelog generator

.github/workflows/main.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ jobs:
116116
# FAILS IF: Lock file doesn't match package.json
117117
run: pnpm install --frozen-lockfile
118118

119+
# =============================================================================
120+
# BUILD FOR CHANGESET
121+
# Build TypeScript to ensure custom changelog generator is available
122+
# =============================================================================
123+
124+
- name: Build for changeset
125+
# Must build before versioning since custom changelog is TypeScript
126+
# The compiled JS file is needed at: ./dist/src/dev/changelog-custom.js
127+
run: pnpm build
128+
119129
# =============================================================================
120130
# VERSION MANAGEMENT
121131
# Determines if release needed based on changesets
@@ -139,8 +149,11 @@ jobs:
139149

140150
- name: Build
141151
# Skip build if no version change (e.g., docs-only commits)
152+
# Clean and rebuild to ensure SBOM reflects exact build artifacts
142153
if: steps.version.outputs.changed == 'true'
143-
run: pnpm build
154+
run: |
155+
pnpm clean # Remove any previous build artifacts
156+
pnpm build # Fresh build for release
144157
145158
- name: Generate SBOM
146159
# Software Bill of Materials for supply chain security

0 commit comments

Comments
 (0)