fix(release): use npm ci so package-lock.json is never modified in CI#76
Merged
Conversation
npm install can rewrite package-lock.json when the npm version on the runner differs from the one used locally. GoReleaser's git-dirty check then aborts the release. npm ci installs the exact locked versions without touching the file. Applies to both the frontend build target and the test-frontend target for consistency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the build/test workflow for the embedded Next.js frontend so CI and release builds don’t mutate frontend/package-lock.json, preventing GoReleaser’s git-dirty check from aborting releases.
Changes:
- Switch
make frontendto usenpm ciinstead ofnpm install. - Switch
make test-frontendto usenpm ciinstead ofnpm install.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
The v0.3.3 release failed because
make frontendrannpm install, which rewrotefrontend/package-lock.jsonon the CI runner (different npm version, differentresolved metadata). GoReleaser's git-dirty check then aborted before any builds ran.
Switching to
npm ciinstalls the exact locked versions without touching the lockfile, so the working tree stays clean for GoReleaser's check.
Changes
frontend:andtest-frontend:Makefile targets now usenpm ciinstead ofnpm installTesting
Reproduced the failure by inspecting the v0.3.3 run log (
goreleaser: git is in a dirty state — M frontend/package-lock.json). The fix is mechanical:npm ciisexplicitly documented to never modify
package-lock.json. The next tag push willconfirm it end-to-end.