[break] feat(builder): add publish build stage mirroring upload flow … - #901
Merged
Conversation
…(#publish)
Add a new `publish` build stage as a chained post-build step, mirroring the
existing `upload` stage's flow but with a placeholder implementation.
- schema: extend `nextStages` enum with `publish`; add `SchemaPublishResult` /
`IPublishResultData`
- api: `BuilderApi.publish` -> `executeBuildStageTask(platform, 'publish', ...)`
- api: `CocosAPI.publishProject` entry point
- launcher: `Launcher.publish` static method
- cli: register `PublishCommand` (`cocos publish -p <platform> -d <dest>`)
- types: declare `publish` hook in `IInternalHook` / `BuildHook` namespaces
(only the main `publish` hook, no before/after wrappers)
- platform config (web-mobile/web-desktop): register `publish` in
`customBuildStages` with distinct `publishStage.*` i18n keys to avoid
collision with the upload stage's existing `publish.*` keys
- platform hooks (web-mobile/web-desktop): add `publish` delegating to
`webPublish.publish`
- web-common/publish.ts: placeholder implementation that reads the
`packageId` produced by a prior successful upload stage and writes
`custom.publish = { pending, success, packageId }`; the real publish/release
API call is left as a TODO
- tests: mirror `builder-api-upload.spec.ts` -> `builder-api-publish.spec.ts`
Co-Authored-By: Claude Code <noreply@anthropic.com>
star-e
approved these changes
Sep 1, 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.
…(#publish)
Add a new
publishbuild stage as a chained post-build step, mirroring the existinguploadstage's flow but with a placeholder implementation.nextStagesenum withpublish; addSchemaPublishResult/IPublishResultDataBuilderApi.publish->executeBuildStageTask(platform, 'publish', ...)CocosAPI.publishProjectentry pointLauncher.publishstatic methodPublishCommand(cocos publish -p <platform> -d <dest>)publishhook inIInternalHook/BuildHooknamespaces (only the mainpublishhook, no before/after wrappers)publishincustomBuildStageswith distinctpublishStage.*i18n keys to avoid collision with the upload stage's existingpublish.*keyspublishdelegating towebPublish.publishpackageIdproduced by a prior successful upload stage and writescustom.publish = { pending, success, packageId }; the real publish/release API call is left as a TODObuilder-api-upload.spec.ts->builder-api-publish.spec.ts