NomadWorks publishes to npm as @neuralnomads/nomadworks.
- Versioning, build verification, and npm publishing are handled by the GitHub Actions workflow
Release npm package. - Pushes to
devautomatically publish npm prereleases. - Pushes to
mainautomatically publish stable npm releases. - GitHub Actions publishes through npm Trusted Publishing with provenance enabled.
- The workflow does not commit or tag version changes back to the repository. It derives the publish version from
package.jsonand npm's already-published versions.
Configure npm Trusted Publishing for this GitHub repository before relying on CI publishes.
At a minimum, npm must trust this repository's GitHub Actions workflow as a publisher for @neuralnomads/nomadworks.
Expected setup:
- Open the npm package settings for
@neuralnomads/nomadworks. - Configure a Trusted Publisher for this GitHub repository.
- Allow GitHub Actions from this repository to publish the package.
Critical npm-side details:
- GitHub organization or user:
NeuralNomadsAI - Repository:
NomadWorks - Workflow filename:
release.yml - If you use an optional environment in npm's Trusted Publisher settings, it must exactly match the GitHub Actions environment name used by the workflow.
package.jsonmust include arepository.urlthat exactly matcheshttps://github.com/NeuralNomadsAI/NomadWorks.- GitHub Actions must run on a supported Node.js version for npm Trusted Publishing. This workflow uses Node.js
24.
No NPM_TOKEN repository secret is required once Trusted Publishing is configured correctly.
The release workflow performs these steps:
- Triggers automatically on pushes to
devandmain. - Installs dependencies with
npm ci. - Runs
npm run release:check, which executes tests, buildsdist/, and previews the publish tarball. - Resolves the publish version based on the current branch and npm registry history.
- Applies that version locally with
npm version --no-git-tag-version. - Publishes the package with
npm publish --provenanceusing npm Trusted Publishing.
- Publishes prereleases using the
rcdist-tag. - Reads the stable base version from
package.json. - Looks up already published versions on npm.
- Publishes the next version in the sequence:
<package.json version>-rc.N
Example:
package.json:1.4.0- published prereleases:
1.4.0-rc.0,1.4.0-rc.1 - next
devpublish:1.4.0-rc.2
- Publishes stable releases using the default
latestdist-tag. - Publishes the exact stable version in
package.json. - Skips publishing if that version already exists on npm.
Example:
package.json:1.4.0- push to
main - publish:
1.4.0
- Keep
package.jsonon a stable semver base such as1.4.0. - Do not commit prerelease versions like
1.4.0-rc.2intopackage.json. - Use
devto publish release candidates for the current base version. - When the package is ready, merge the versioned changes to
mainto publish the stable release.
Before triggering a release, you can run the same verification locally:
npm run release:checkThis command:
- runs the test suite
- builds
dist/ - runs
npm pack --dry-runto preview the package contents
prepackrunsnpm run build, so localnpm packandnpm publishalways include a freshdist/build.publishConfig.accessis set topublicso the scoped package can publish correctly on npm.- The prerelease counter is remembered via npm registry history, not via git tags or committed prerelease versions.
- CI publishing depends on npm Trusted Publishing plus the workflow permission
id-token: write. - If you need to dry-run a release locally without publishing, use
npm run release:checkand inspect the tarball preview output.