Skip to content

Publish to npm on release - #50

Merged
mpge merged 1 commit into
masterfrom
ci/npm-publish
Nov 27, 2026
Merged

mpge merged 1 commit into
masterfrom
ci/npm-publish

Conversation

@mpge

@mpge mpge commented Nov 27, 2026

Copy link
Copy Markdown
Member

npm still has @escalated-dev/plugin-sdk 0.1.0 while v0.2.1 is released, because no workflow published it (install-readiness audit, 2026-11-27).

This adds .github/workflows/npm-publish.yml, modelled on escalated-nestjs. It runs on a published release, or by hand with a tag. It then:

  1. Checks the tag matches the package.json version.
  2. Builds and runs the same tests as run-tests.yml.
  3. Checks the tarball. main and types must be present, with no src/, tests/ or .github/. Locally npm pack --dry-run gives 35 files: build/, LICENSE, package.json, README.
  4. Publishes with provenance. Versions with a prerelease suffix go to the next tag.

Without an NPM_TOKEN secret (or the NPM_TRUSTED_PUBLISHING variable set to true), the publish step skips with a warning rather than the green notice the other repos use, so a missing token shows up.

To publish 0.2.1 after merging, add NPM_TOKEN and run "Publish to npm" with tag v0.2.1. The tag's package.json is already 0.2.1. escalated-adonis can then depend on the npm package instead of the GitHub tarball.

npm still has 0.1.0 while v0.2.1 is released, because nothing published
it. The workflow checks the tag matches package.json, builds, runs the
tests, checks the tarball and publishes with provenance. Without an
NPM_TOKEN secret (or NPM_TRUSTED_PUBLISHING) it skips with a warning.
@mpge
mpge merged commit d8c0310 into master Nov 27, 2026
3 checks passed
@mpge
mpge deleted the ci/npm-publish branch November 27, 2026 20:26
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.

1 participant