Repository navigation
ci: Remove the previous build before building generated models - #13
Merged
Merged
Conversation
tsc does not delete output, and lib/ is committed, so compiled files for models that no longer exist stayed in lib/ and were published. After data-models 3.0.11, lib/schema/Quantity and lib/oa/OpportunityAttendanceUpdateSimulateAction remained although their sources were removed. Remove lib/ in the runner before building. If the build or tests fail, the job stops before creating a pull request, so the repository is never left without a lib/. A clean build of the current update differs from the committed lib/ only by those four orphaned files. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
hkir-dev
approved these changes
Oct 28, 2026
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.
Merging releases 1.0.7 to npm (the current models, without the pending update in #5).
Summary
The Update Data Model workflow builds the generated models into
lib/, which is committed and published.tscnever deletes output, so compiled files for models that no longer exist stay inlib/. The current update (#5) removessrc/schema/Quantity.ts(schema.org 30.1 madeQuantitya data type) and renames the test interface'sOpportunityAttendanceUpdateSimulateActiontoAttendeeAbsentSimulateAction, but leaves their compiled.jsand.d.tsfiles inlib/.This adds a step that removes
lib/in the runner before the build.Why this is safe
The step only affects the runner's copy of the repository. The job then builds and runs the tests, and only creates or updates the pull request if both succeed. If the build or tests fail, the job stops and nothing is pushed, so the repository is never left without a
lib/. The publish workflow is unchanged.Verification
actionlint: no issues.lib/only by the four orphaned files (lib/schema/Quantity.{js,d.ts},lib/oa/OpportunityAttendanceUpdateSimulateAction.{js,d.ts}); every other file is identical.After merging
Run Update Data Model again so #5 is regenerated without the orphaned files, then merge #5.
When squash-merging, check the suggested commit message does not contain a skip-CI marker.