Skip to content

Latest commit

 

History

History
35 lines (18 loc) · 3.4 KB

ReleaseProcess.md

File metadata and controls

35 lines (18 loc) · 3.4 KB

Release Process: openlaw-client

Submitting Changes ✨

New code changes should always be introduced via a Pull Request branch:

  1. Pull latest master branch then create new branch off from master and make the changes there. (Note that you should not change the version number in package.json because that is automatically managed via the release process below.)

  2. On that new branch, if there have been any changes to package.json that require a fresh npm install (e.g. updating a dependency version) then do that first. When you run npm install it should update the package-lock.json file -- make sure those updates are committed to the code as well.

  3. Otherwise, run sbt fullOptJS and then npm run build:prod and make sure those complete with no errors. If there are errors, resolve those before continuing.

  4. Ensure your Javascript code passes lints and adheres to our style guide. If you are not running a plugin in your editor that does this for you automatically, you can run npm run lint:fix and npm run style:fix respectively to automatically resolve any issues.

  5. Submit PR for merging that new branch into master. GitHub Actions will automatically attempt a build and run linter checks, which you can see under Actions. If the build and all checks are passing, the PR can be merged to master.

Releasing to NPM 🚀

New releases are always cut from the master branch, and managed via GitHub Releases with Semantic Versioning formatted tags. As a developer, this process is largely automated for you. Just make sure you are a collaborator of openlaw-client and you have installed the npm ci and npm np packages. To make a release of the current status of master, follow these steps:

  1. Switch to master and pull the latest.

  2. Run npm run release to start the release process.

  3. A prompt will appear in your console allowing you to pick what sort of Semantic Version increment to pick. In most cases, you will be selecting a patch release. (Note: you can skip the interactive prompt for a patch by substituting npm run release:patch in the step above.)

  4. You'll see the release steps going through in your console.§ When that's done the openlaw-client repo should open in your web browser with a draft release. All you have to do there is verify the release notes and click publish.

    §: Behind the scenes, the package*.json files will be updated with the new version, a new git commit and tag will be made and pushed to GitHub, and your web browser will be automatically opened to a draft release page for making a "release" of that tag.

  5. Once a GitHub Release is published, our CI system (currently GitHub Actions) will automatically start the process to publish the package to NPM. You can monitor the progress for that action under Actions.

  6. You will see multiple identical actions of Build and publish. One will eventually successfully publish the package while the other will fail. Don't worry that is expected right now and it is a TODO to clean that up.

  7. Confirm that the package was successfully published with the latest version number by checking the NPM listing.