Skip to content

10 Publishing a New Release Version

Brady Mitchell edited this page Apr 18, 2024 · 1 revision

Publishing a New Release Version

Publishing a new release means the package version is updated, a GitHub Release is published, and the new version is published to NPM.
Follow these easy steps to publish a new version.

1. Update the version

This can be done manually in the package.json file but it is recommended to use the bump scripts as they should be less prone to error.
Use one of the following commands in the root level of the project to update the version by either patch, minor, or major.

# For bug fixes, typos, dependency updates, security patches, etc.
npm run bump:patch

# For new feature additions.
npm run bump:minor

# For breaking or big changes.
npm run bump:major


2. Run the Create Release workflow

Go to the Actions tab and click on the Create Release workflow.
Click on the Run workflow button, title the release, and click Run workflow.

After the workflow has successfully run, the new version will be tagged and released in GitHub under Releases,
and a new version will be published to NPM.



3. Edit the Changelog

By default, a simple changelog will be added to the Releases with a list of commits since the last release.

It is highly advised that as part of the release process we edit the Release description to give it a more detailed changelog.
It is especially important that we describe any breaking changes.

Here is an example of how you might format a Release description:

## Breaking Changes
- Modified `SSOUser` type, `identity_provider` was changed from type `string` to `'idir' | 'bceidboth' | 'bceidbasic' | 'bceidbusiness' | 'githubbcgov'`.

## New Features
- Added `afterUserLogout` option to `SSOOptions` type as parameter to `sso()` function.  
Use this to configure custom events to take place after a user has logged out.

## Bug Fixes
- Fixed login error when an `idpHint` was not set.

## Commit Changelog
285bdb4 - Version bump in package.json
50rhje6 - Added afterUserLogout option
e154541 - Modified SSOUser type
899c9e3 - Fixed login error
37cacf7 - Updated readme