Skip to content

chore(packages): publish the SDK and CLI to GitHub Packages - #217

Merged
tobi-ax merged 1 commit into
mainfrom
chore/TSSDK-85-publish-to-github-packages
Nov 19, 2026
Merged

tobi-ax merged 1 commit into
mainfrom
chore/TSSDK-85-publish-to-github-packages

Conversation

@tobi-ax

@tobi-ax tobi-ax commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Jira: TSSDK-85, part of TSSDK-83

The release workflow publishes @aignostics/sdk and @aignostics/cli to the aignostics organisation's npm registry on GitHub Packages instead of npmjs.com. This is the first step of making both packages internal. Moving the consumers, deprecating the npm packages and switching the repository to internal come in their own PRs.

Both packages already exist on GitHub Packages as private packages linked to this repository. This workflow published them there with GITHUB_TOKEN until August 2025, and Portal installs SDK 3.8.1 from there today. Release PR #196 (cli 4.1.0) will be the first release through the new path.

Changes

  • release-please.yml: publish-sdk and publish-cli point setup-node at https://npm.pkg.github.com with the @aignostics scope, get packages: write, and publish with GITHUB_TOKEN. Nothing in the workflow reads NPM_TOKEN any more.
  • packages/{sdk,cli}/package.json: publishConfig names GitHub Packages with restricted access. A repository field with directory keeps the packages linked to this repository.
  • .npmrc: maps @aignostics to GitHub Packages, like Portal, HETA Studio and web-wsi-viewer. Every @aignostics dependency here is a workspace link, so npm ci needs no token.
  • README.md and both package READMEs: how to set up the registry and a read:packages token for installs.
  • docs/SOFTWARE_ARCHITECTURE.md: GitHub Packages replaces the public npm registry as the distribution channel.

Testing

  • npm ci with an empty user .npmrc (no GitHub token) succeeds, so the test jobs are unaffected.
  • npm publish --dry-run in both packages reports Publishing to https://npm.pkg.github.com/ with tag latest and restricted access.
  • Build, lint and format check pass. zizmor reports the same two informational use-trusted-publishing notes as on main. npm trusted publishing applies only to npmjs.com.

The real test is the first release after merge. If GitHub Packages rejects the publish with 403, the package settings have to grant this repository write access under "Manage Actions access".

🤖 Generated with Claude Code

Both packages are to become internal to Aignostics. The release
workflow now publishes them to the aignostics organisation's npm
registry on GitHub Packages with the workflow's GITHUB_TOKEN, and the
repository's .npmrc maps the @aignostics scope there. The READMEs
explain how to authenticate for installs.

Refs: TSSDK-85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 11:21
@ox-security

ox-security Bot commented Nov 19, 2026

Copy link
Copy Markdown

OX Security Logo

OX Security reviewed this pull request — nothing to fix.

✔ No issues found

Branch chore/TSSDK-85-publish-to-github-packages → main

View scan in OX Security →

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The registry migration requires human confirmation that both private packages grant this repository’s Actions write access and that an authenticated consumer can install the released CLI and resolve its SDK dependency.

No open issues 🎉

What changed in this PR

Moves future SDK and CLI releases from npmjs.com to GitHub Packages as the first step toward internal distribution. Consumer migration, npm deprecation, and repository visibility changes remain separate work.

Changes:

  • Updates publishing jobs to use GitHub Packages with GITHUB_TOKEN and package-write permissions.
  • Sets restricted publishing, repository metadata, and the scoped registry configuration.
  • Documents authenticated installation and updates the architecture’s distribution channel.
File Description
README.md Adds registry and token setup instructions.
packages/​sdk/​README.md Links SDK installation to registry setup.
packages/​sdk/​package.json Configures restricted GitHub Packages publishing and repository linkage.
packages/​cli/​README.md Links CLI installation to registry setup.
packages/​cli/​package.json Configures restricted GitHub Packages publishing and repository linkage.
docs/​SOFTWARE_ARCHITECTURE.md Documents GitHub Packages as the distribution channel.
.npmrc Routes the @aignostics scope to GitHub Packages.
.github/​workflows/​release-please.yml Switches both publishing jobs to GitHub Packages authentication and permissions.

Review effort: Balanced

@tobi-ax

tobi-ax commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Written on behalf of tobi-ax by Claude Opus 5.5


On Copilot's two open points:

Consumer install. In an empty project whose only config is @aignostics:registry=https://npm.pkg.github.com/, with a read:packages token, npm install @aignostics/cli@2.2.0 @aignostics/sdk@3.8.1 resolves both from npm.pkg.github.com, and aignostics --version runs. GitHub Packages serves only the versions it hosts: SDK up to 3.8.1, CLI up to 2.2.0. The CLI declares @aignostics/sdk: ^3.6.1, so cli 4.1.0 from #196 will resolve SDK 3.8.1. All 21 SDK methods the CLI calls exist in SDK 3.8.1. The 3.9.0 change (share tokens on run, item and artifact reads) isn't used by the CLI.

Actions write access. It can only be confirmed by the first publish. Both packages were created by this repository's own workflow with GITHUB_TOKEN in August 2025 (the release jobs before fd5d386), so the repository has had write access since then. If the first publish returns 403, grant it under the package's "Manage Actions access".

@tobi-ax tobi-ax changed the title chore(sdk,cli): publish the packages to GitHub Packages chore(packages): publish the SDK and CLI to GitHub Packages Nov 19, 2026
@tobi-ax
tobi-ax merged commit ed7ace0 into main Nov 19, 2026
15 checks passed
@tobi-ax
tobi-ax deleted the chore/TSSDK-85-publish-to-github-packages branch November 19, 2026 12:38
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.

3 participants