This project publishes sandcode to npm.
- Registry:
https://registry.npmjs.org - Package:
sandcode - Tags:
nextfor prerelease validation buildslatestfor stable releases
Workflow: .github/workflows/publish.yml
- Any merge to
maintriggers publish automation. - Normal PR merges publish the next patch as a prerelease tagged
next. - The automated bump PR publishes the stable patch tagged
latest. - The workflow verifies:
- the expected dist-tag points to the published version
- a clean registry install succeeds
sandcode --helpand subcommand help all execute
- GitHub Actions:
contents: writepull-requests: write
- npm trusted publishing:
- configure
sandcodeon npm to trust this GitHub repository - keep the publish job on a GitHub-hosted runner so npm can verify OIDC identity
- configure
- Optional:
GH_PATif bump PR creation should use a PAT instead ofGITHUB_TOKEN
npm view sandcode dist-tags
npm view sandcode versions --jsonThe first sandcode publish should be done locally to create the package on npm. After that, enable npm trusted publishing for the GitHub repo and point it at .github/workflows/publish.yml.
bun install
bun run check
bun run typecheck
bun test
bun run build
npm packThen install the tarball into a clean local test project and smoke it before publishing:
cd /path/to/sandcode-testing
mkdir -p local-publish-check
cd local-publish-check
npm init -y
npm install /absolute/path/to/sandcode-<version>.tgz
./node_modules/.bin/sandcode --help
./node_modules/.bin/sandcode analyze --help
./node_modules/.bin/sandcode start --help
./node_modules/.bin/sandcode setup --helpWhen that passes, publish from the repo root:
npm login
npm publishIf your npm account requires publish-time 2FA, the npm CLI will prompt for the verification step. With a YubiKey/WebAuthn setup, that flow is handled interactively rather than by a static --otp value.
Reset latest:
npm dist-tag add sandcode@0.0.<good> latestReset next:
npm dist-tag add sandcode@0.0.<good>-next.<build> nextDelete a bad version:
- remove it from npm with an account allowed to manage package versions
- Revert bad code on a PR and merge it.
- Retag
nextorlatestif installs need to be corrected immediately. - Verify:
npm view sandcode dist-tags- clean install into a temp project
sandcode --help
- Keep the automated version-bump PR aligned with the next intended stable patch.