1
- # Release Process Guide (v2.2.2 )
1
+ # Release Process (v1.0.0 )
2
2
3
3
## Version
4
4
5
5
> ** The ` [semantic version] ` is bumped according to releases, new features, and breaking changes.**
6
6
>
7
- > * The ` develop ` branch uses the ( semantic version) suffix ` -develop ` . *
7
+ > * The ` main ` branch uses the semantic version of the last released version.
8
8
9
9
## Process
10
10
@@ -21,79 +21,74 @@ git remote show torrust
21
21
...
22
22
```
23
23
24
- ### 1. The ` develop ` branch is ready for a release
25
-
26
- The ` develop ` branch should have the version ` [semantic version]-develop ` that is ready to be released.
27
-
28
- ### 2. Stage ` develop ` HEAD for merging into the ` main ` branch
24
+ ### 1. The ` main ` branch is ready for a release
29
25
30
26
``` sh
31
- git fetch --all
32
- git push --force torrust develop:staging/main
27
+ npm install && npm run lint && npm run build
33
28
```
34
29
35
- ### 3. Create Release Commit
30
+ There should be no errors installing or building the library.
36
31
37
- ``` sh
38
- git stash
39
- git switch staging/main
40
- git reset --hard torrust/staging/main
41
- # change `[semantic version]-develop` to `[semantic version]`.
42
- git add -A
43
- git commit -m " release: version [semantic version]"
44
- git push torrust
45
- ```
32
+ ### 2. Change the version in the ` package.json ` file
46
33
47
- ### 4. Create and Merge Pull Request from ` staging/main ` into ` main ` branch
34
+ Change the version in the ` package.json ` file. For example ` 3.0.0 ` .
48
35
49
- Pull request title format: "Release Version ` [semantic version] ` ".
36
+ You might need to update also the torrust dependencies:
50
37
51
- This pull request merges the new version into the ` main ` branch.
52
-
53
- ### 5. Push new version from ` main ` HEAD to ` releases/v[semantic version] ` branch
38
+ - torrust-index-api-lib
39
+ - torrust-index-types-lib
54
40
55
41
``` sh
56
- git fetch --all
57
- git push torrust main:releases/v[semantic version]
42
+ npm update torrust-index-types-lib
43
+ npm update torrust-index-api-lib
58
44
```
59
45
60
- > ** Check that the deployment is successful! **
46
+ > NOTICE: The ` v ` prefix is not needed.
61
47
62
- ### 6. Create Release Tag
48
+ Install and run linter and build to double-check:
63
49
64
50
``` sh
65
- git switch releases/v[semantic version]
66
- git tag --sign v[semantic version]
67
- git push --tags torrust
51
+ npm install && npm run lint && npm run build
68
52
```
69
53
70
- ### 7. Create Release on Github from Tag
54
+ At this point, you should check that the new version is working wit the Index, before creating the tag.
71
55
72
- This is for those who wish to download the source code.
56
+ Commit the changes:
73
57
74
- ### 8. Stage ` main ` HEAD for merging into the ` develop ` branch
58
+ ``` sh
59
+ git add -A
60
+ git commit -m " feat: release [semantic version]"
61
+ ```
75
62
76
- Merge release back into the develop branch.
63
+ ### 3. Create a new tag an push to the remote
77
64
78
65
``` sh
79
- git fetch --all
80
- git push --force torrust main:staging/develop
66
+ git tag v[semantic version]
67
+ git push torrust && git push torrust v[semantic version]
81
68
```
82
69
83
- ### 9. Create Comment that bumps next development version
70
+ For example:
84
71
85
72
``` sh
86
- git stash
87
- git switch staging/develop
88
- git reset --hard torrust/staging/develop
89
- # change `[semantic version]` to `(next)[semantic version]-develop`.
90
- git add -A
91
- git commit -m " develop: bump to version (next)[semantic version]-develop"
92
- git push torrust
73
+ git tag v3.0.0
74
+ git push torrust && git push torrust v3.0.0
75
+ ```
76
+
77
+ ### 4. Manually publish the NPM package
78
+
79
+ ``` sh
80
+ npm publish
93
81
```
94
82
95
- ### 10. Create and Merge Pull Request from ` staging/develop ` into ` develop ` branch.
83
+ > IMPORTANT:
84
+ >
85
+ > - You will require to login.
86
+ > - You have to have permission for publishing on the Torrust namespace.
87
+
88
+ If you get an error because you were not logged in, just retry the same command after the login.
89
+
90
+ ### 4. Check the package is published
96
91
97
- Pull request title format: "Version ` [semantic version] ` was Released" .
92
+ You should receive an email when the package is published .
98
93
99
- This pull request merges the new release into the ` develop ` branch and bumps the version number .
94
+ You can also check on the NPM registry: < https://www.npmjs.com/package/torrust-index-gui > .
0 commit comments