This document describes how to release new versions of @dsiu/rescript-graphology.
- You must be logged in to npm:
npm whoami - You must have publish access to the
@dsiuscope on npm
This package uses npm Trusted Publishing with GitHub Actions OIDC. This eliminates the need for npm tokens stored as secrets.
- Go to npmjs.com and log in
- Navigate to your package:
@dsiu/rescript-graphology - Go to Settings > Publishing access
- Under Trusted Publishing, click Add a trusted publisher
- Configure:
- Repository owner:
dsiu - Repository name:
rescript-graphology - Workflow filename:
publish.yml - Environment: (leave blank)
- Repository owner:
- Click Add
Note: You must publish the package manually at least once before you can configure Trusted Publishing.
# Update version in package.json
npm version patch # or minor, majorThis will:
- Update
package.jsonversion - Create a git commit
- Create a git tag
git push origin main --tags# Create a release (this triggers the publish workflow)
gh release create v0.1.0 --title "v0.1.0" --notes "See CHANGELOG.md for details"Or create the release via GitHub UI:
- Go to Releases > Create a new release
- Choose the tag you just pushed
- Add release title and notes
- Click Publish release
The publish.yml workflow will automatically:
- Run tests
- Publish to npm with provenance
For the very first publish (before Trusted Publishing is configured):
# Ensure you're logged in
npm whoami
# Build and test
yarn clean && yarn build && yarn test
# Publish (first time only)
npm publish --access publicAfter the first publish, configure Trusted Publishing as described above.
If you need to publish manually (e.g., Trusted Publishing issues):
# Login to npm
npm login
# Build and test
yarn clean && yarn build && yarn test
# Publish
npm publish --access publicAfter publishing:
- Check npm:
npm view @dsiu/rescript-graphology - Verify provenance badge on npmjs.com package page
- Test installation in a new project:
mkdir test-install && cd test-install npm init -y npm install @dsiu/rescript-graphology
- Patch (0.0.x): Bug fixes, documentation updates
- Minor (0.x.0): New features, non-breaking changes
- Major (x.0.0): Breaking changes
For pre-1.0 releases, minor versions may include breaking changes.