This repository publishes two public npm packages:
codex-pet-webcodex-pet-web-react
- Ensure
mainhas the release commit and CI is green. - Configure npm Trusted Publishing for each package.
- Ensure GitHub Actions is enabled for the repository.
- Confirm package names are available or already owned by the npm account:
npm view codex-pet-web version
npm view codex-pet-web-react versionThe latest release line is 0.2.x.
Trusted Publishing is preferred over long-lived npm tokens. Configure it on npmjs.com for each published package:
- Organization or user:
FroeMic - Repository:
codex-pets-web - Workflow filename:
publish.yml - Environment name: leave empty
At the time this repository was prepared, both package names were unclaimed.
Each package must be published once before its Trusted Publisher can be
configured. Publish them manually after npm login, then add the same Trusted
Publisher settings:
npm publish -w packages/core --access public --tag next
npm publish -w packages/react --access public --tag nextDo not create an automation token with 2FA bypass unless Trusted Publishing is not available for your npm account or package.
Run these before publishing:
npm ci
npm run typecheck
npm run test
npm run build
npm run pack:dryUse the manual GitHub Actions workflow:
- Open Actions.
- Select Publish Packages.
- Run workflow on
main. - Choose
nextfornpm_tag.
Equivalent local commands after npm login:
npm publish -w packages/core --access public --tag next
npm publish -w packages/react --access public --tag nextmkdir /tmp/codex-pets-consumer
cd /tmp/codex-pets-consumer
npm init -y
npm install codex-pet-web@next codex-pet-web-react@next react react-dom
node --input-type=module -e "import { CODEX_PET_ATLAS } from 'codex-pet-web'; import { CodexPet } from 'codex-pet-web-react'; console.log(CODEX_PET_ATLAS.width, typeof CodexPet)"Expected output includes:
1536 object
After prerelease validation, run the same Publish Packages workflow with
latest.
Equivalent local commands after npm login:
npm publish -w packages/core --access public --tag latest
npm publish -w packages/react --access public --tag latest- Keep
codex-pet-web-reactdependent on the matching compatiblecodex-pet-webrange. - Update
CHANGELOG.mdbefore each release. - Run
npm run pack:dryand inspect tarball contents before publishing.