Skip to content

Commit 67bb2a7

Browse files
committed
Merge #48: docs: add release process
8e7e8fa docs: add release process (Jose Celano) Pull request description: Add documentation for the release process. It's just the current process I'm following when I publish a new version. It does not mean we should continue doing it this way. I just only wanted to make it public. ACKs for top commit: josecelano: ACK 8e7e8fa Tree-SHA512: 616d8b6ccc4a3f9e2c493480766a10ca53a9d225f34beb69abfc0627b18ed77c2f54972fc789840675701bb86a5609af652cbd0dd0b34b35ffffb8ae18bb4ad6
2 parents 3c0e040 + 8e7e8fa commit 67bb2a7

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

docs/release_process.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Release Process (v1.0.0)
2+
3+
## Version
4+
5+
> **The `[semantic version]` is bumped according to releases, new features, and breaking changes.**
6+
>
7+
> *The `main` branch uses the semantic version of the last released version.
8+
9+
## Process
10+
11+
**Note**: this guide assumes that the your git `torrust` remote is like this:
12+
13+
```sh
14+
git remote show torrust
15+
```
16+
17+
```s
18+
* remote torrust
19+
Fetch URL: [email protected]:torrust/torrust-index-api-lib.git
20+
Push URL: [email protected]:torrust/torrust-index-api-lib.git
21+
...
22+
```
23+
24+
### 1. The `main` branch is ready for a release
25+
26+
```sh
27+
npm install && npm run build
28+
```
29+
30+
There should be no errors installing or building the library.
31+
32+
### 2. Change the version in the `package.json` file
33+
34+
Change the version in the `package.json` file. For example `3.0.0`.
35+
36+
> NOTICE: The `v` prefix is not needed.
37+
38+
Install and build to double-check:
39+
40+
```sh
41+
npm install && npm run build
42+
```
43+
44+
Commit the changes:
45+
46+
```sh
47+
git add -A
48+
git commit -m "feat: release [semantic version]"
49+
```
50+
51+
### 3. Create a new tag an push to the remote
52+
53+
```sh
54+
git tag v[semantic version]
55+
git push torrust && git push torrust v[semantic version]
56+
```
57+
58+
For example:
59+
60+
```sh
61+
git tag v3.0.0
62+
git push torrust && git push torrust v3.0.0
63+
```
64+
65+
### 4. Manually publish the NPM package
66+
67+
```sh
68+
npm publish
69+
```
70+
71+
> IMPORTANT:
72+
>
73+
> - You will require to login.
74+
> - You have to have permission for publishing on the Torrust namespace.
75+
76+
If you get an error because you were not logged in, just retry the same command after the login.
77+
78+
### 4. Check the package is published
79+
80+
You should receive an email when the package is published.
81+
82+
You can also check on the NPM registry: <https://www.npmjs.com/package/torrust-index-api-lib>.

0 commit comments

Comments
 (0)