Skip to content

feat(ci): publish public packages to both npm and GitHub Packages with dual-scope support - #24

Merged
dongjiang1989 merged 3 commits into
iflytek:mainfrom
dongjiang1989:add-github-npm
Jul 2, 2026
Merged

feat(ci): publish public packages to both npm and GitHub Packages with dual-scope support#24
dongjiang1989 merged 3 commits into
iflytek:mainfrom
dongjiang1989:add-github-npm

Conversation

@dongjiang1989

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:

Summary

  • Fix preview-release workflow: explicitly specify public package paths for pkg-pr-new publish to avoid No packages error when internal packages are
    marked private: true
  • Add GitHub Packages publishing to the release workflow, publishing under the @iflytek/ scope so packages appear at iflytek/memflywheel/packages
  • Refactor scripts/publish-npm.mjs to support dual-registry publishing via --registry flag:
    • npm (default): publishes @iflytekopensource/adapters and @iflytekopensource/hermes
    • GitHub Packages: rewrites scope from @iflytekopensource/@iflytek/ (including dependency references) before publishing
  • Add .npmrc to .gitignore to prevent accidental commit of temporary auth tokens

Checks

  • pnpm run ci
  • No old project names, private paths, credentials, or AI-signature footers
  • Package metadata still points to iflytek/memflywheel
  • Core does not call LLMs directly
  • Recall remains full-index, with no embedding/BM25/top-k/vector retrieval

Special notes for reviewers

Publish public packages to both npm and GitHub Packages with dual-scope support

Signed-off-by: dongjiang <dongjiang1989@126.com>
@dongjiang1989
dongjiang1989 requested review from FenjuFu and OLDyade July 1, 2026 08:56
@dongjiang1989 dongjiang1989 self-assigned this Jul 1, 2026

@OLDyade OLDyade left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the dual-registry publish path and the preview-release fix. CI is green, but I found one blocker before approval.

When publishing to GitHub Packages, scripts/publish-npm.mjs rewrites package names and dependency keys from @iflytekopensource/* to @iflytek/*. That makes @iflytek/hermes depend on @iflytek/adapters, but the packaged Hermes runtime still hardcodes @iflytekopensource/adapters in bin/install.mjs, bridge/worker.mjs, and provider/__init__.py. Installing the GitHub-scoped Hermes package would therefore fail to resolve the adapter package.

Minimal fix: when staging GitHub Packages tarballs, also rewrite the runtime adapter import strings in the Hermes package from @iflytekopensource/adapters to @iflytek/adapters, or keep the dependency name aligned with the runtime import. After that I think this is good to approve.

Signed-off-by: dongjiang <dongjiang1989@126.com>
@dongjiang1989

Copy link
Copy Markdown
Contributor Author

rewrite the runtime adapter

Thanks @OLDyade Good catch.
Change scope rewrite.

Signed-off-by: dongjiang <dongjiang1989@126.com>

@OLDyade OLDyade left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker addressed: GitHub Packages scope rewrite now also updates Hermes runtime adapter imports. CI is green.

@dongjiang1989
dongjiang1989 merged commit beddbda into iflytek:main Jul 2, 2026
7 checks passed
@dongjiang1989
dongjiang1989 deleted the add-github-npm branch July 2, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants