Skip to content

chore: publish as @ethersphere/core-sdk - #2

Merged
darkobas2 merged 2 commits into
mainfrom
chore/publish-as-ethersphere-core-sdk
Aug 18, 2026
Merged

chore: publish as @ethersphere/core-sdk#2
darkobas2 merged 2 commits into
mainfrom
chore/publish-as-ethersphere-core-sdk

Conversation

@darkobas2

@darkobas2 darkobas2 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Closes the code side of ethersphere/infra_tasks#94.

Rebased onto @slapec93's chore: rename package to public name — his version: 0.0.1 is kept, and the release-please manifest is seeded to match it.

Already done outside this PR

Repo visibility now public — required for npm publish --provenance
publish environment created, empty and unprotected, matching swarm-cli
GHA_PAT_BASIC core-sdk added to the org secret's selected-repositories list
main branch created and made default by @slapec93

In this PR

package.jsonrepository, homepage, bugs, description. repository is not cosmetic: npm publish --provenance requires it, because provenance binds the tarball to a source repo. Without it the publish workflow fails even with everything else correct.

LICENSE + license: BSD-3-Clause. The repo had no license and no license field, so npm would have published this as UNLICENSED — wrong for a library meant to be consumed by bee-js and swarm-cli. BSD-3-Clause matches both of those. @slapec93 this is the one thing here I chose rather than looked up, so please confirm it.

release_github.yml — two separate bugs. The run on main failed with:

##[warning]Unexpected input(s) 'package-name', 'bump-minor-pre-major'
##[error]release-please failed: Input required and not supplied: token

The token error is just the missing secret — now secrets.GHA_PAT_BASIC, the org secret swarm-cli's release-please actually runs on, and core-sdk has been added to its allowlist. REPO_GHA_PAT was never created on this repo.

The warning is the subtler one. release-please-action@v5 does not accept package-name or bump-minor-pre-major at all — it warns and carries on, so nothing fails loudly, but bump-minor-pre-major: true was never in effect and the first breaking change would have cut 1.0.0 instead of 0.1.0. swarm-cli pins @v2, where both inputs are still valid, which is exactly why the copied config looked right. v5 takes these from release-please-config.json + .release-please-manifest.json (both at default paths), added here. Also adds the contents/pull-requests write permissions the action needs.

README — the install line said @ethersphere/swarm-core and the imports said bare swarm-core/..., a third name matching neither package.json nor reality. All now @ethersphere/core-sdk.

Still blocking the first publish

publish_npmjs.yml passes no NODE_AUTH_TOKEN, and swarm-cli's publish environment holds no secret either — those releases run on npm Trusted Publishing (OIDC). That has to be registered on npmjs.com against this package (repo ethersphere/core-sdk, workflow publish_npmjs.yml, environment publish) by ethersphereowner or ethswarm-devops. Until it exists the first publish fails regardless of this PR. @ethersphere/core-sdk is currently unclaimed on npm.

Renames the package from @upcoming/swarm-core to @ethersphere/core-sdk,
per ethersphere/infra_tasks#94. The @upcoming scope stays in use as the
development/staging scope; this is the official release name.

- package.json: name -> @ethersphere/core-sdk
- package.json: add repository/homepage/bugs/description. The repository
  field is REQUIRED by `npm publish --provenance` -- without it the
  publish workflow fails, since provenance has to bind the tarball to a
  source repo.
- LICENSE + package.json license: BSD-3-Clause, matching bee-js and
  swarm-cli. The repo had no license at all, so npm would have shipped
  this as UNLICENSED -- wrong for a library intended to be consumed by
  bee-js and swarm-cli.
- release_github.yml: package-name -> core-sdk, and point release-please
  at the org secret GHA_PAT_BASIC. That is the secret swarm-cli's
  release-please actually runs on, and core-sdk has now been added to its
  selected-repositories list. REPO_GHA_PAT was never created here.
- README: install line and every import path updated. The README had a
  third spelling (@ethersphere/swarm-core) that matched neither the
  package name nor the imports.
The first run of this workflow on main failed, and its log showed two
separate problems, not one:

  ##[warning]Unexpected input(s) 'package-name', 'bump-minor-pre-major'
  ##[error]release-please failed: Input required and not supplied: token

The token error is fixed in the previous commit. The warning is the more
subtle one: release-please-action@v5 does not accept `package-name` or
`bump-minor-pre-major` as inputs at all. It warns and continues, so the
workflow does not fail on them -- it just quietly ignores them. Renaming
`package-name` to core-sdk was therefore dead config on its own, and
`bump-minor-pre-major: true` was never taking effect, meaning the first
breaking change would have cut 1.0.0 instead of 0.1.0.

v5 takes these from release-please-config.json + the manifest instead
(both at their default paths, so no `config-file` input is needed):

- release-please-config.json: release-type node, package-name
  @ethersphere/core-sdk, bump-minor-pre-major true
- .release-please-manifest.json: seeded at 0.0.8, the current version

Also adds the contents/pull-requests write permissions the action needs.

swarm-cli pins @v2, where both inputs are still valid -- which is why the
copied-over config looked correct.
@darkobas2
darkobas2 force-pushed the chore/publish-as-ethersphere-core-sdk branch from e425e3c to e900705 Compare August 18, 2026 11:43

@slapec93 slapec93 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.

LGTM 👌

@darkobas2
darkobas2 merged commit c3cad92 into main Aug 18, 2026
3 checks passed
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