This document outlines the process for creating a new release of the @uor-foundation/math-js
package.
- Ensure you have appropriate permissions to publish to GitHub Packages.
- Make sure you have a GitHub Personal Access Token with appropriate permissions if you need to publish manually.
- No additional configuration is needed for automated publishing through GitHub Actions, as it uses the built-in GITHUB_TOKEN.
-
Prepare the release
- Ensure all changes for the release are merged into the
main
branch - Check that all tests are passing on CI
- Update the
CHANGELOG.md
with release notes for the new version
- Ensure all changes for the release are merged into the
-
Update version
- Use the npm version command to update the package version and create a git tag:
# For a patch release (bug fixes) npm version patch # For a minor release (new features, backward compatible) npm version minor # For a major release (breaking changes) npm version major
- This will automatically create a commit with the updated version and a corresponding git tag
- Use the npm version command to update the package version and create a git tag:
-
Push changes
- Push the changes and tag to GitHub:
git push && git push --tags
- Push the changes and tag to GitHub:
-
Create a GitHub Release
- Go to the GitHub repository page
- Click on "Releases" > "Create a new release"
- Select the tag you just pushed
- Enter a title (e.g., "v1.0.0")
- Copy the release notes from the CHANGELOG.md
- Publish the release
-
Monitor the release
- The GitHub Actions workflow will automatically publish the package to GitHub Packages
- Verify that the package has been published correctly by checking the Packages section of the GitHub repository: https://github.com/UOR-Foundation/math-js/packages
- Announce the release to stakeholders if needed
- Start the next development cycle
If the automatic publishing fails:
- Check the GitHub Actions logs for errors
- Ensure that the workflow has proper permissions to write packages
- If necessary, you can publish manually:
# Authenticate with GitHub Packages npm login --registry=https://npm.pkg.github.com --scope=@uor-foundation # Then build and publish npm ci npm run build npm publish