Releases are published to npm from GitHub Actions using trusted publishing (OIDC), so no npm token is stored in the repository. Packages get provenance attestations automatically.
- Bump the version:
npm version <patch|minor|major> --no-git-tag-version
- Commit and push to
master. - Create a GitHub release
with a new tag
X.Y.Z(novprefix, matching earlier releases). - The
publishworkflow waits for approval in thenpmenvironment, then builds the package and runsnpm publish.
- npm: on npmjs.com β
codejarβ Settings β Trusted Publisher, add a GitHub Actions publisher with repositoryantonmedv/codejar, workflowpublish.yamland environmentnpm. Then set publishing access to "Require two-factor authentication and disallow tokens". - GitHub: environment
npm(Settings β Environments) with a required reviewer, limited to tags matching*.*.*. - GitHub Pages: Settings β Pages β Source: "GitHub Actions". The
pagesworkflow deploys the demo on every push tomaster.