Skip to content

Commit 27815cc

Browse files
committed
docs: tweak docs about releases
1 parent 02ab04e commit 27815cc

1 file changed

Lines changed: 53 additions & 36 deletions

File tree

docs/making-releases.md

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
- [Introduction](#introduction)
44
- [Regular or Hotfix?](#regular-or-hotfix)
5-
- [Github and Git steps](#github-and-git-steps)
6-
- [Run Tests](#run-tests)
7-
- [Publish the Dataverse Client Javascript package](#publish-the-dataverse-client-javascript-package)
5+
- [Create Github Issue and Release Branch](#create-github-issue-and-release-branch)
6+
- [Update the version](#update-the-version)
87
- [Merge "release branch" into "main"](#merge-release-branch-into-main)
9-
- [Merge "main" into "develop"](#merge-main-into-develop)
8+
- [Publish the Dataverse Client Javascript package](#publish-the-dataverse-client-javascript-package)
9+
- [Create a Draft Release on GitHub and Tag the Version](#create-a-draft-release-on-github-and-tag-the-version)
10+
- [Merge "release branch" into "develop"](#merge-release-branch-into-develop)
11+
- [Delete "release branch"](#delete-release-branch)
1012

1113
## Introduction
1214

13-
This document is about releasing a public version of the dataverse-client-javascript package to the npm registry.
15+
This document is about releasing a new version of dataverse-client-javascript.
1416

1517
## Regular or Hotfix?
1618

@@ -22,49 +24,42 @@ Early on, make sure it’s clear what type of release this is. The steps below d
2224
- Hotfix
2325
- e.g. 1.1.1 (patch)
2426

25-
## Github and Git steps
27+
## Create Github Issue and Release Branch
2628

2729
First of all create an issue on Github to prepare the release, name it Release vX.X.X .
2830

2931
On your local, create the release branch from the latest from develop and name it release/X.X.X .
3032

31-
## Run Tests
33+
## Update the version
3234

33-
Let's check that all tests are passing by running `npm run test`. If everything is OK you can continue with the next step.
35+
To update the version run the command `npm version <X.X.X> --no-git-tag-version`. So if we are releasing version `3.5.0` the command will be:
3436

35-
## Publish the Dataverse Client Javascript package
36-
37-
Dataverse Client Javascript is [published](https://www.npmjs.com/package/@iqss/dataverse-client-javascript) to the npm Package Registry. Below are the steps for publishing a new version.
38-
39-
1. **Build the package**
40-
41-
Now we need to build the package by running `npm run build`, after that you will see a `dist` folder in the root of the project. If you are not sure that folder was there already you can delete it and run the build command again.
37+
```shell
38+
npm version 3.5.0 --no-git-tag-version
39+
```
4240

43-
2. **Update the version**
41+
This command will update the version in the `package.json` and `package-lock.json`.
4442

45-
To update the version run the command `npm version <X.X.X> -m "dataverse-client-javascript-v%s"`. So if we are releasing version `3.5.0` the command will be:
43+
If everything looks good, you can push the changes to the repository.
4644

47-
```shell
48-
npm version 3.5.0 -m "dataverse-client-javascript-v%s"
49-
```
45+
## Merge "release branch" into "main"
5046

51-
This command will update the version in the `package.json` and `package-lock.json`, create a commit and a tag named `dataverse-client-javascript-v3.5.0`.
47+
Create a pull request to merge the `release` branch into the `main` branch.
48+
Once important tests have passed (unit, functional, integration), merge the pull request (skipping code review is ok).
5249

53-
If everything looks good, you can push the changes to the repository.
50+
## Publish the Dataverse Client Javascript package
5451

55-
```shell
56-
git push && git push --tags
57-
```
52+
Once the release branch has been merged, switch to the `main` branch on your local machine and update it to ensure you have the latest changes.
5853

59-
3. **Review the new tag in GitHub**
54+
Dataverse Client Javascript is [published](https://www.npmjs.com/package/@iqss/dataverse-client-javascript) to the npm Package Registry. Below are the steps for publishing a new version.
6055

61-
After pushing the changes, you can review the new tag in the [GitHub repository](https://github.com/IQSS/dataverse-client-javascript/tags).
56+
1. **Build the package**
6257

63-
The tag should be created with the new version.
58+
Now we need to build the package by running `npm run build`, after that you will see a `dist` folder in the root of the project. If you are not sure that folder was there already you can delete it and run the build command again.
6459

65-
4. **Publish the package**
60+
2. **Publish the package**
6661

67-
After the version is updated, you can publish the package running the next command:
62+
As the version number is already updated and we build the package, now we can publish the package running the next command:
6863

6964
```shell
7065
npm publish --access public
@@ -83,19 +78,41 @@ Dataverse Client Javascript is [published](https://www.npmjs.com/package/@iqss/d
8378
@iqss:registry=https://registry.npmjs.org/
8479
```
8580
86-
5. **Review the new version in the npm registry**
81+
3. **Review the new version in the npm registry**
8782
8883
After publishing the package, you can review the new version in the [npm registry](https://www.npmjs.com/package/@iqss/dataverse-client-javascript?activeTab=versions).
8984
9085
The new version should be available in the npm registry.
9186
92-
## Merge "release branch" into "main"
87+
## Create a Draft Release on GitHub and Tag the Version
9388
94-
Create a pull request to merge the `release` branch into the `main` branch.
95-
Once important tests have passed (unit, functional, integration), merge the pull request (skipping code review is ok).
89+
After merging the `release` branch into the `main` branch, you should create a release on GitHub and tag the version.
90+
91+
Go to https://github.com/IQSS/dataverse-client-javascript/releases/new to start creating a draft release.
92+
93+
- Under "Choose a tag" you will be creating a new tag. Have it start with a "v" such as v3.5.0. Click "Create new tag on publish".
94+
95+
- Under "Target", choose "main".
9696
97-
## Merge "main" into "develop"
97+
- Under "Release title" use the same name as the tag such as v3.5.0.
98+
99+
- Add a description of the changes included in this release. You should include a link to the recently published npm version and summarize the key updates, fixes, or features.
100+
101+
- Click "Save draft" because we do not want to publish the release yet.
102+
103+
At this point you can send around the draft release for any final feedback. Make corrections to the draft, if necessary. Publish once everything is ok.
104+
105+
## Merge "release branch" into "develop"
98106
99107
After merging the release branch into `main`, ensure the develop branch is updated with the latest changes.
100108
101-
Create a pull request to merge the `main` branch into `develop` branch.
109+
Create a pull request to merge the `release` branch into `develop` branch also.
110+
111+
## Delete "release branch"
112+
113+
Once the release process is complete and the `release` branch has been merged into both `main` and `develop`, you can safely delete the `release` branch to keep the repository clean.
114+
115+
- Delete the branch locally from your repository.
116+
- Delete the branch remotely from the remote repository.
117+
118+
This ensures that the `release` branch is no longer present in either your local or remote repositories.

0 commit comments

Comments
 (0)