Automate dist regeneration for Rolldown updates - #825
Draft
amyu wants to merge 4 commits into
Draft
Conversation
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.
Summary
dist/files at the pull request headWhy
Rolldown updates can change bundled output even when application source files do not change. Renovate updates
package.jsonandpnpm-lock.yaml, but it does not regeneratedist/, socheck-distfails and requires a manual build commit.Design
The workflow only handles pull requests created by the Renovate GitHub App account, from the same repository, on a
renovate/rolldown-*branch, with package manifest changes.The build job has read-only repository access, does not persist Git credentials, and runs
pnpm run all, covering postinstall patches, lint, formatting, type checking, and bundling. Ifdist/changes, it uploads the generated files as an artifact.A separate job verifies that the pull request head has not moved, downloads the artifact from the same workflow run, and commits only
dist/. This job receivescontents: writeand does not execute dependency or generated code. The built-in repository-scopedGITHUB_TOKENis used, so no additional secret is required.Security
pnpm dlx rimrafbuild step is replaced with the Node.js filesystem API.Validation
zizmor1.29.0 with online auditsactionlint1.7.12pnpm run allwith Node.js 24.19.0 and pnpm 11.20.0git diff --check