ci: include built files in release commit#197
Merged
dhensby merged 1 commit intotediousjs:masterfrom Apr 14, 2026
Merged
Conversation
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>
6316b5c to
be998ad
Compare
|
🎉 This PR is included in version 3.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When semantic-release creates a new release,
@semantic-release/npmbumps the version inpackage.json, but the project is not rebuilt before the release commit is created. This meansREADME.md(which derives the usage version tag frompackage.json) andlib/main/index.jsare stale in the release commit, causing theCheck built filesCI job to fail on subsequent pushes to master.Fix
Add a
versionscript topackage.jsonthat runsnpm run build && git add README.md lib/. This hooks into the npm version lifecycle that@semantic-release/npmtriggers when bumping the version, ensuring the built output is rebuilt and staged before the release commit.