From 74738fd4e7f96f406860a9500c0a3835b48e5992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Flatval?= Date: Thu, 20 Jun 2024 12:47:21 +0200 Subject: [PATCH] chore: update release instructions --- RELEASING.md | 57 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index a292a09cc62..14f51847fab 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,40 +2,27 @@ Releasing Reveal involves releasing NPM packages `@cognite/reveal` and/or updati deployed when pushed to master. # Publishing packages -Publishing of new packages to NPM is handled automatically by a Github Actions workflow which is triggered when publishing a new release on GitHub. -The only consideration you need to make when publishing a new release, is that the NPM package version must be unique meaning that the package version has not been released previously. -### Updating latest documentation -To update the documentation with any changes that might have been added since the last release: - -Assuming you are at the root of the project navigate do the documentation folder and run the update script - -```bash - -cd documentation - -# replaces the 'latest' documentation by the 'next' -yarn replace-latest-by-next -``` - -1. Commit these changes +### Update the package version -2. Create a PR with the changes. +First, Reveal's package version must be incremented. This is done by changing the "version" field at the top of `viewer/package.json`. We use [semantic versioning](https://semver.org/#summary). Increment patch version if the changes are purely internal or only affects experimental features (so e.g. 4.14.1 becomes 4.14.2), or increment minor version if there are new features added (new types, functions, classes, new fields in already-existing types). -Once the PR is merged into master, the documentation will be automatically deployed. +Submit a PR with the version number update. Make sure it has been merged before continuing with the next steps. ### Create a release on GitHub 1. Go to [https://github.com/cognitedata/reveal/releases/new](https://github.com/cognitedata/reveal/releases/new) 2. Under the "Tag version" field, add a new tag for this release with the name and version of the package, e.g. `@cognite/reveal@3.2.0` 3. Specify the same release title as the tag name. -4. Write the changes that new version brings. Get inspired by done tasks from your sprint board. Note! - Remember to specify the correct ThreeJS version required by the released version - you can find this in package.json - of the viewer. -Also, you can check what's committed from the previous tag with that command: +4. Write the changes that new version brings. Use the commit history. You can check what's committed from the previous tag (in this case, 3.1.9) with this command: ```bash - git log --pretty=format:"* %s" @cognite/reveal@3.2.0...HEAD + git log --pretty=format:"* %s" @cognite/reveal@3.1.9...HEAD ``` + +Note! + Remember to specify the correct ThreeJS version required by the released version - you can find this in package.json + of the viewer. + Use the following template: ``` This version of Reveal is compatible with ThreeJS . @@ -60,3 +47,27 @@ This version of Reveal is compatible with ThreeJS . See [installation documentation](https://cognitedata.github.io/reveal-docs/docs/installation) for details about installing Reveal. ``` 5. Hit the green "Publish release" button + + +### Publish the NPM package + +Then, to publish the NPM package, go to Actions at the top of the Github-page, then find "Publish Package to NPM" to the right. Click "Run workflow", and the package should be underway. + +### Updating latest documentation +To update the documentation with any changes that might have been added since the last release: + +Assuming you are at the root of the project navigate do the documentation folder and run the update script + +```bash + +cd documentation + +# replaces the 'latest' documentation by the 'next' +yarn replace-latest-by-next +``` + +1. Commit these changes + +2. Create a PR with the changes. + +Once the PR is merged into master, the documentation will be automatically deployed.