Skip to content

ci: include built files in release commit#197

Merged
dhensby merged 1 commit intotediousjs:masterfrom
dhensby:fix/release-build-output
Apr 14, 2026
Merged

ci: include built files in release commit#197
dhensby merged 1 commit intotediousjs:masterfrom
dhensby:fix/release-build-output

Conversation

@dhensby
Copy link
Copy Markdown
Collaborator

@dhensby dhensby commented Apr 14, 2026

Problem

When semantic-release creates a new release, @semantic-release/npm bumps the version in package.json, but the project is not rebuilt before the release commit is created. This means README.md (which derives the usage version tag from package.json) and lib/main/index.js are stale in the release commit, causing the Check built files CI job to fail on subsequent pushes to master.

Fix

Add a version script to package.json that runs npm run build && git add README.md lib/. This hooks into the npm version lifecycle that @semantic-release/npm triggers when bumping the version, ensuring the built output is rebuilt and staged before the release commit.

The npm version lifecycle hook rebuilds the project and stages the
output so that the semantic-release git commit includes up-to-date
built files (lib/main/index.js, README.md).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dhensby dhensby force-pushed the fix/release-build-output branch from 6316b5c to be998ad Compare April 14, 2026 22:22
@dhensby dhensby changed the title fix: include built files in release commit ci: include built files in release commit Apr 14, 2026
@dhensby dhensby merged commit 4bcdac9 into tediousjs:master Apr 14, 2026
16 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant