This document describes how releases are cut and published to npm for this package.
- Package:
react-native-libsignal-client - Registry: https://registry.npmjs.org
- Default branch:
master - Publish mechanism: GitHub Actions (tag-based, from
masteronly)
- Log into https://www.npmjs.com/.
- Go to Profile → Access Tokens.
- Click Generate New Token and choose Automation.
- Copy the token value.
- In the repo, go to
Settings → Secrets and variables → Actions → New repository secret. - Name:
NPM_TOKEN - Value: the automation token.
Publishing is handled by .github/workflows/publish.yml.
- Triggers on tags
v* - Ensures the tag commit is on
master - Run lint
- Publishes to npm using
NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}
Use:
npm version patch
npm version minor
npm version major
This updates package.json, creates a commit, and creates a tag v<version>.
git checkout master
git pull origin master
npm version patch # or minor/major
git push origin master --follow-tags
GitHub Actions will automatically publish.
- Checks out repo
- Fetches master and verifies tag is on master
- Installs deps (
npm ci) - Runs lint
- Publishes with:
npm publish --access public
- Tag not on master → Create the tag on master.
- Version exists → Bump again and push.
- 403 error →
NPM_TOKENlacks permission.
- Never commit
NPM_TOKEN - Store only as GitHub secret or local env var
- Revoke and rotate on suspicion of leak
- Releases triggered by pushing tags
v*on master - Use
npm versionfor bumping - GitHub Actions handles lint and publishing