semantic-release 25.0.4 → 25.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +36 -37
  2. package/bin/semantic-release.js +1 -1
  3. package/index.js +265 -37
  4. package/lib/branches/expand.js +18 -0
  5. package/lib/branches/get-tags.js +39 -0
  6. package/lib/branches/index.js +71 -0
  7. package/lib/branches/normalize.js +104 -0
  8. package/lib/definitions/branches.js +22 -0
  9. package/lib/definitions/constants.js +8 -9
  10. package/lib/definitions/errors.js +303 -0
  11. package/lib/definitions/plugins.js +108 -0
  12. package/lib/get-commits.js +31 -0
  13. package/lib/get-config.js +98 -0
  14. package/lib/get-error.js +7 -0
  15. package/lib/get-git-auth-url.js +126 -0
  16. package/lib/get-last-release.js +48 -0
  17. package/lib/get-logger.js +19 -0
  18. package/lib/get-next-version.js +35 -0
  19. package/lib/get-release-to-add.js +59 -0
  20. package/lib/git.js +381 -0
  21. package/lib/hide-sensitive.js +14 -1
  22. package/lib/plugins/index.js +103 -0
  23. package/lib/plugins/normalize.js +69 -0
  24. package/lib/plugins/pipeline.js +59 -0
  25. package/lib/plugins/utils.js +81 -0
  26. package/lib/utils.js +101 -0
  27. package/lib/verify.js +43 -0
  28. package/package.json +20 -15
  29. package/docs/README.md +0 -7
  30. package/docs/developer-guide/README.md +0 -5
  31. package/docs/developer-guide/js-api.md +0 -294
  32. package/docs/developer-guide/plugin.md +0 -284
  33. package/docs/developer-guide/shareable-configuration.md +0 -1
  34. package/docs/extending/README.md +0 -4
  35. package/docs/extending/plugins-list.md +0 -233
  36. package/docs/extending/shareable-configurations-list.md +0 -22
  37. package/docs/recipes/ci-configurations/README.md +0 -7
  38. package/docs/recipes/ci-configurations/circleci-workflows.md +0 -49
  39. package/docs/recipes/ci-configurations/github-actions.md +0 -136
  40. package/docs/recipes/ci-configurations/gitlab-ci.md +0 -98
  41. package/docs/recipes/ci-configurations/jenkins-ci.md +0 -61
  42. package/docs/recipes/ci-configurations/travis.md +0 -97
  43. package/docs/recipes/git-hosted-services/README.md +0 -3
  44. package/docs/recipes/git-hosted-services/git-auth-ssh-keys.md +0 -166
  45. package/docs/recipes/release-workflow/README.md +0 -5
  46. package/docs/recipes/release-workflow/distribution-channels.md +0 -117
  47. package/docs/recipes/release-workflow/maintenance-releases.md +0 -157
  48. package/docs/recipes/release-workflow/pre-releases.md +0 -197
  49. package/docs/support/FAQ.md +0 -253
  50. package/docs/support/README.md +0 -7
  51. package/docs/support/git-version.md +0 -4
  52. package/docs/support/node-support-policy.md +0 -21
  53. package/docs/support/node-version.md +0 -38
  54. package/docs/support/resources.md +0 -22
  55. package/docs/support/troubleshooting.md +0 -70
  56. package/docs/usage/README.md +0 -9
  57. package/docs/usage/ci-configuration.md +0 -50
  58. package/docs/usage/configuration.md +0 -206
  59. package/docs/usage/getting-started.md +0 -8
  60. package/docs/usage/installation.md +0 -51
  61. package/docs/usage/plugins.md +0 -105
  62. package/docs/usage/shareable-configurations.md +0 -7
  63. package/docs/usage/workflow-configuration.md +0 -199
@@ -1,117 +0,0 @@
1
- # Publishing on distribution channels
2
-
3
- This recipe will walk you through a simple example that uses distribution channels to make releases available only to a subset of users, in order to collect feedback before distributing the release to all users.
4
-
5
- This example uses the **semantic-release** default configuration:
6
-
7
- - [branches](../../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'main', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
8
- - [plugins](../../usage/configuration.md#plugins): `['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']`
9
-
10
- ## Initial release
11
-
12
- We'll start by making the first commit of the project, with the code for the initial release and the message `feat: initial commit` to `master` or `main`. When pushing that commit, **semantic-release** will release the version `1.0.0` and make it available on the default distribution channel which is the dist-tag `@latest` for npm.
13
-
14
- The Git history of the repository is:
15
-
16
- ```
17
- * feat: initial commit # => v1.0.0 on @latest
18
- ```
19
-
20
- ## Releasing a bug fix
21
-
22
- We can now continue to commit changes and release updates to our users. For example we can commit a bug fix with the message `fix: a fix` to `master` or `main`. When pushing that commit, **semantic-release** will release the version `1.0.1` on the dist-tag `@latest`.
23
-
24
- The Git history of the repository is now:
25
-
26
- ```
27
- * feat: initial commit # => v1.0.0 on @latest
28
- * fix: a fix # => v1.0.1 on @latest
29
- ```
30
-
31
- ## Releasing a feature on next
32
-
33
- We now want to develop an important feature, which is a breaking change. Considering the scope of this feature we want to make it available, at first, only to our most dedicated users in order to get feedback. Once we get that feedback we can make improvements and ultimately make the new feature available to all users.
34
-
35
- To implement that workflow we can create the branch `next` and commit our feature to this branch. When pushing that commit, **semantic-release** will release the version `2.0.0` on the dist-tag `@next`. That means only the users installing our module with `npm install example-module@next` will receive the version `2.0.0`. Other users installing with `npm install example-module` will still receive the version `1.0.1`.
36
-
37
- The Git history of the repository is now:
38
-
39
- ```
40
- * feat: initial commit # => v1.0.0 on @latest
41
- * fix: a fix # => v1.0.1 on @latest
42
- | \
43
- | * feat: a big feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0 on @next
44
- ```
45
-
46
- ## Releasing a bug fix on next
47
-
48
- One of our users starts to use the new `2.0.0` release and reports a bug. We develop a bug fix and commit it to the `next` branch with the message `fix: fix something on the big feature`. When pushing that commit, **semantic-release** will release the version `2.0.1` on the dist-tag `@next`.
49
-
50
- The Git history of the repository is now:
51
-
52
- ```
53
- * feat: initial commit # => v1.0.0 on @latest
54
- * fix: a fix # => v1.0.1 on @latest
55
- | \
56
- | * feat: a big feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0 on @next
57
- | * fix: fix something on the big feature # => v2.0.1 on @next
58
- ```
59
-
60
- ## Releasing a feature on latest
61
-
62
- We now want to develop a smaller, non-breaking feature. Its scope is small enough that we don't need to have a phase of feedback and we can release it to all users right away.
63
-
64
- If we were to commit that feature on `next` only a subset of users would get it, and we would need to wait for the end of our feedback period in order to make both the big and the small feature available to all users.
65
-
66
- Instead, we develop that small feature commit it to `master` or `main` with the message `feat: a small feature`. When pushing that commit, **semantic-release** will release the version `1.1.0` on the dist-tag `@latest` so all users can benefit from it right away.
67
-
68
- The Git history of the repository is now:
69
-
70
- ```
71
- * feat: initial commit # => v1.0.0 on @latest
72
- * fix: a fix # => v1.0.1 on @latest
73
- | \
74
- | * feat: a big feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0 on @next
75
- | * fix: fix something on the big feature # => v2.0.1 on @next
76
- * | feat: a small feature # => v1.1.0 on @latest
77
- ```
78
-
79
- ## Porting a feature to next
80
-
81
- Most of our users now have access to the small feature, but we still need to make it available to our users using the `@next` dist-tag. To do so we need to merge our changes made on `master` or `main` (the commit `feat: a small feature`) into `next`. As `master`/`main` and `next` branches have diverged, this merge might require to resolve conflicts.
82
-
83
- Once the conflicts are resolved and the merge commit is pushed to `next`, **semantic-release** will release the version `2.1.0` on the dist-tag `@next` which contains both our small and big feature.
84
-
85
- The Git history of the repository is now:
86
-
87
- ```
88
- * feat: initial commit # => v1.0.0 on @latest
89
- * fix: a fix # => v1.0.1 on @latest
90
- | \
91
- | * feat: a big feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0 on @next
92
- | * fix: fix something on the big feature # => v2.0.1 on @next
93
- * | feat: a small feature # => v1.1.0 on @latest
94
- | * Merge branch master/main into next # => v2.1.0 on @next
95
- ```
96
-
97
- ## Adding a version to latest
98
-
99
- After a period of feedback from our users using the `@next` dist-tag we feel confident to make our big feature available to all users. To do so we merge the `next` branch into `master`/`main`. There should be no conflict as `next` is strictly ahead of `master`/`main`.
100
-
101
- Once the merge commit is pushed to `master`/`main`, **semantic-release** will add the version `2.1.0` to the dist-tag `@latest` so all users will receive it when installing out module with `npm install example-module`.
102
-
103
- The Git history of the repository is now:
104
-
105
- ```
106
- * feat: initial commit # => v1.0.0 on @latest
107
- * fix: a fix # => v1.0.1 on @latest
108
- | \
109
- | * feat: a big feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0 on @next
110
- | * fix: fix something on the big feature # => v2.0.1 on @next
111
- * | feat: a small feature # => v1.1.0 on @latest
112
- | * Merge branch master/main into next # => v2.1.0 on @next
113
- | /|
114
- * | Merge branch next into master/main # => v2.1.0 on @latest
115
- ```
116
-
117
- We can now continue to push new fixes and features on `master`/`main`, or a new breaking change on `next` as we did before.
@@ -1,157 +0,0 @@
1
- # Publishing maintenance releases
2
-
3
- This recipe will walk you through a simple example that uses Git branches and distribution channels to publish fixes and features for old versions of a package.
4
-
5
- This example uses the **semantic-release** default configuration:
6
-
7
- - [branches](../../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'main', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
8
- - [plugins](../../usage/configuration.md#plugins): `['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']`
9
-
10
- ## Initial release
11
-
12
- We'll start by making the first commit of the project, with the code for the initial release and the message `feat: initial commit`. When pushing that commit, on `master`/`main` **semantic-release** will release the version `1.0.0` and make it available on the default distribution channel which is the dist-tag `@latest` for npm.
13
-
14
- The Git history of the repository is:
15
-
16
- ```
17
- * feat: initial commit # => v1.0.0 on @latest
18
- ```
19
-
20
- ## Releasing a breaking change
21
-
22
- We now decide to drop Node.js 6 support for our package, and require Node.js 8 or higher, which is a breaking change.
23
-
24
- We commit that change with the message `feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required` to `master`/`main`. When pushing that commit, **semantic-release** will release the version `2.0.0` on the dist-tag `@latest`.
25
-
26
- The Git history of the repository is now:
27
-
28
- ```
29
- * feat: initial commit # => v1.0.0 on @latest
30
- * feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
31
- ```
32
-
33
- ## Releasing a feature for version 1.x users
34
-
35
- One of our users request a new feature, however they cannot migrate to Node.js 8 or higher due to corporate policies.
36
-
37
- If we were to push that feature on `master`/`main` and release it, the new version would require Node.js 8 or higher as the release would also contain the commit `feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required`.
38
-
39
- Instead, we create the branch `1.x` from the tag `v1.0.0` with the command `git checkout -b 1.x v1.0.0` and we commit that feature with the message `feat: a feature` to the branch `1.x`. When pushing that commit, **semantic-release** will release the version `1.1.0` on the dist-tag `@release-1.x` so users who can't migrate to Node.js 8 or higher can benefit from it.
40
-
41
- The Git history of the repository is now:
42
-
43
- ```
44
- * feat: initial commit # => v1.0.0 on @latest
45
- | \
46
- * | feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
47
- | * feat: a feature # => v1.1.0 on @1.x
48
- ```
49
-
50
- ## Releasing a bug fix for version 1.0.x users
51
-
52
- Another user currently using version `1.0.0` reports a bug. They cannot migrate to Node.js 8 or higher and they also cannot migrate to `1.1.0` as they do not use the feature developed in `feat: a feature` and their corporate policies require to go through a costly quality assurance process for each `minor` upgrades.
53
-
54
- In order to deliver the bug fix in a `patch` release, we create the branch `1.0.x` from the tag `v1.0.0` with the command `git checkout -b 1.0.x v1.0.0` and we commit that fix with the message `fix: a fix` to the branch `1.0.x`. When pushing that commit, **semantic-release** will release the version `1.0.1` on the dist-tag `@release-1.0.x` so users who can't migrate to `1.1.x` or `2.x` can benefit from it.
55
-
56
- The Git history of the repository is now:
57
-
58
- ```
59
- * feat: initial commit # => v1.0.0 on @latest
60
- | \
61
- * | feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
62
- | | \
63
- | * | feat: a feature # => v1.1.0 on @1.x
64
- | | * fix: a fix # => v1.0.1 on @1.0.x
65
- ```
66
-
67
- ## Porting a bug fix from 1.0.x to 1.x
68
-
69
- Now that we have released a fix in version `1.0.1` we want to make it available to `1.1.x` users as well.
70
-
71
- To do so we need to merge the changes made on `1.0.x` (the commit `fix: a fix`) into the `1.x` branch. As `1.0.x` and `1.x` branches have diverged, this merge might require to resolve conflicts.
72
-
73
- Once the conflicts are resolved and the merge commit is pushed to the branch `1.x`, **semantic-release** will release the version `1.1.1` on the dist-tag `@release-1.x` which contains both our feature and bug fix.
74
-
75
- The Git history of the repository is now:
76
-
77
- ```
78
- * feat: initial commit # => v1.0.0 on @latest
79
- | \
80
- * | feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
81
- | | \
82
- | * | feat: a feature # => v1.1.0 on @1.x
83
- | | * fix: a fix # => v1.0.1 on @1.0.x
84
- | | /|
85
- | * | Merge branch 1.0.x into 1.x # => v1.1.1 on @1.x
86
- ```
87
-
88
- ## Porting bug fixes and features to master/main
89
-
90
- Finally we want to make both our feature and bug fix available to users using the `@latest` dist-tag.
91
-
92
- To do so we need to merge the changes made on `1.x` (the commits `feat: a feature` and `fix: a fix`) into `master`/`main`. As `1.x` and `master`/`main` branches have diverged, this merge might require to resolve conflicts.
93
-
94
- Once the conflicts are resolved and the merge commit is pushed to `master` or `main`, **semantic-release** will release the version `2.1.0` on the dist-tag `@latest` which now contains the breaking change feature, the feature and the bug fix.
95
-
96
- The Git history of the repository is now:
97
-
98
- ```
99
- * feat: initial commit # => v1.0.0 on @latest
100
- | \
101
- * | feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
102
- | | \
103
- | * | feat: a feature # => v1.1.0 on @1.x
104
- | | * fix: a fix # => v1.0.1 on @1.0.x
105
- | | /|
106
- | * | Merge branch 1.0.x into 1.x # => v1.1.1 on @1.x
107
- | /| |
108
- * | | Merge branch 1.x into master/main # => v2.1.0 on @latest
109
- ```
110
-
111
- ## Releasing a bug fix for version 2.1.0 users
112
-
113
- One of our users using the version `2.1.0` version reports a bug.
114
-
115
- We can simply commit the bug fix with the message `fix: another fix` to `master`/`main`. When pushing that commit, **semantic-release** will release the version `2.1.1` on the dist-tag `@latest`.
116
-
117
- The Git history of the repository is now:
118
-
119
- ```
120
- * feat: initial commit # => v1.0.0 on @latest
121
- | \
122
- * | feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
123
- | | \
124
- | * | feat: a feature # => v1.1.0 on @1.x
125
- | | * fix: a fix # => v1.0.1 on @1.0.x
126
- | | /|
127
- | * | Merge branch 1.0.x into 1.x # => v1.1.1 on @1.x
128
- | /| |
129
- * | | Merge branch 1.x into master/main # => v2.1.0 on @latest
130
- * | | fix: another fix # => v2.1.1 on @latest
131
- ```
132
-
133
- ## Porting a bug fix from master/main to 1.x
134
-
135
- The bug fix `fix: another fix` also affects version `1.1.1` users, so we want to port it to the `1.x` branch.
136
-
137
- To do so we need to cherry pick our fix commit made on `master`/`main` (`fix: another fix`) into `1.x` with `git checkout 1.x && git cherry-pick <sha of fix: another fix>`. As `master`/`main` and `1.x` branches have diverged, the cherry picking might require to resolve conflicts.
138
-
139
- Once the conflicts are resolved and the commit is pushed to `1.x`, **semantic-release** will release the version `1.1.2` on the dist-tag `@release-1.x` which contains `feat: a feature`, `fix: a fix` and `fix: another fix` but not `feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required`.
140
-
141
- The Git history of the repository is now:
142
-
143
- ```
144
- * feat: initial commit # => v1.0.0 on @latest
145
- | \
146
- * | feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required # => v2.0.0 on @latest
147
- | | \
148
- | * | feat: a feature # => v1.1.0 on @1.x
149
- | | * fix: a fix # => v1.0.1 on @1.0.x
150
- | | /|
151
- | * | Merge branch 1.0.x into 1.x # => v1.1.1 on @1.x
152
- | /| |
153
- * | | Merge branch 1.x into master/main # => v2.1.0 on @latest
154
- * | | fix: another fix # => v2.1.1 on @latest
155
- | | |
156
- | * | fix: another fix # => v1.1.2 on @1.x
157
- ```
@@ -1,197 +0,0 @@
1
- # Publishing pre-releases
2
-
3
- This recipe will walk you through a simple example that uses pre-releases to publish beta versions while working on a future major release and then make only one release on the default distribution.
4
-
5
- This example uses the **semantic-release** default configuration:
6
-
7
- - [branches](../../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'main', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
8
- - [plugins](../../usage/configuration.md#plugins): `['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']`
9
-
10
- ## Initial release
11
-
12
- We'll start by making the first commit of the project, with the code for the initial release and the message `feat: initial commit`. When pushing that commit, on `master`/`main` **semantic-release** will release the version `1.0.0` and make it available on the default distribution channel which is the dist-tag `@latest` for npm.
13
-
14
- The Git history of the repository is:
15
-
16
- ```
17
- * feat: initial commit # => v1.0.0 on @latest
18
- ```
19
-
20
- ## Working on a future release
21
-
22
- We now decide to work on a future major release, which will be composed of multiple features, some of them being breaking changes. We want to publish our package for each new feature developed for test purpose, however we do not want to increment our package version or make it available to our users until all the features are developed and tested.
23
-
24
- To implement that workflow we can create the branch `beta` and commit our first feature there. When pushing that commit, **semantic-release** will publish the pre-release version `2.0.0-beta.1` on the dist-tag `@beta`. That allow us to run integration tests by installing our module with `npm install example-module@beta`. Other users installing with `npm install example-module` will still receive the version `1.0.0`.
25
-
26
- The Git history of the repository is now:
27
-
28
- ```
29
- * feat: initial commit # => v1.0.0 on @latest
30
- | \
31
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
32
- ```
33
-
34
- We can continue to work on our future release by committing and pushing other features or bug fixes on the `beta` branch. With each push, **semantic-release** will publish a new pre-release on the dist-tag `@beta`, which allow us to run our integration tests.
35
-
36
- With another feature, the Git history of the repository is now:
37
-
38
- ```
39
- * feat: initial commit # => v1.0.0 on @latest
40
- | \
41
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
42
- | * feat: second feature # => v2.0.0-beta.2 on @beta
43
- ```
44
-
45
- ## Releasing a bug fix on the default distribution channel
46
-
47
- In the meantime we can also continue to commit changes and release updates to our users.
48
-
49
- For example, we can commit a bug fix with the message `fix: a fix` to `master`/`main`. When pushing that commit, **semantic-release** will release the version `1.0.1` on the dist-tag `@latest`.
50
-
51
- The Git history of the repository is now:
52
-
53
- ```
54
- * feat: initial commit # => v1.0.0 on @latest
55
- | \
56
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
57
- | * feat: second feature # => v2.0.0-beta.2 on @beta
58
- * | fix: a fix # => v1.0.1 on @latest
59
- ```
60
-
61
- ## Working on another future release
62
-
63
- We now decide to work on another future major release, in parallel of the beta one, which will also be composed of multiple features, some of them being breaking changes.
64
-
65
- To implement that workflow we can create the branch `alpha` from the branch `beta` and commit our first feature there. When pushing that commit, **semantic-release** will publish the pre-release version `3.0.0-alpha.1` on the dist-tag `@alpha`. That allow us to run integration tests by installing our module with `npm install example-module@alpha`. Other users installing with `npm install example-module` will still receive the version `1.0.1`.
66
-
67
- The Git history of the repository is now:
68
-
69
- ```
70
- * feat: initial commit # => v1.0.0 on @latest
71
- | \
72
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
73
- | * feat: second feature # => v2.0.0-beta.2 on @beta
74
- * | fix: a fix # => v1.0.1 on @latest
75
- | | \
76
- | | * feat: first feature of other release \n\n BREAKING CHANGE: it breaks something # => v3.0.0-alpha.1 on @alpha
77
- ```
78
-
79
- We can continue to work on our future release by committing and pushing other features or bug fixes on the `alpha` branch. With each push, **semantic-release** will publish a new pre-release on the dist-tag `@alpha`, which allow us to run our integration tests.
80
-
81
- With another feature, the Git history of the repository is now:
82
-
83
- ```
84
- * feat: initial commit # => v1.0.0 on @latest
85
- | \
86
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
87
- | * feat: second feature # => v2.0.0-beta.2 on @beta
88
- * | fix: a fix # => v1.0.1 on @latest
89
- | | \
90
- | | * feat: first feature of other release \n\n BREAKING CHANGE: it breaks something # => v3.0.0-alpha.1 on @alpha
91
- | | * feat: second feature of other release # => v3.0.0-alpha.2 on @alpha
92
- ```
93
-
94
- ## Publishing the 2.0.0 beta release to the default distribution channel
95
-
96
- Once we've developed and pushed all the feature we want to include in the future version `2.0.0` in the `beta` branch and all our tests are successful we can release it to our users.
97
-
98
- To do so we need to merge our changes made on `beta` into `master`/`main`. As `beta` and `master`/`main` branches have diverged, this merge might require to resolve conflicts.
99
-
100
- Once the conflicts are resolved and the merge commit is pushed to `master`/`main`, **semantic-release** will release the version `2.0.0` on the dist-tag `@latest`.
101
-
102
- The Git history of the repository is now:
103
-
104
- ```
105
- * feat: initial commit # => v1.0.0 on @latest
106
- | \
107
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
108
- | * feat: second feature # => v2.0.0-beta.2 on @beta
109
- * | fix: a fix # => v1.0.1 on @latest
110
- | | \
111
- | | * feat: first feature of other release \n\n BREAKING CHANGE: it breaks something # => v3.0.0-alpha.1 on @alpha
112
- | | * feat: second feature of other release # => v3.0.0-alpha.2 on @alpha
113
- | /| |
114
- * | | Merge branch beta into master/main # => v2.0.0 on @latest
115
- ```
116
-
117
- ## Publishing the 3.0.0 alpha release to the beta distribution channel
118
-
119
- Now that we published our the version `2.0.0` that was previously in beta, we decide to promote the version `3.0.0` in alpha to beta.
120
-
121
- To do so we need to merge our changes made on `alpha` into `beta`. There should be no conflict as `alpha` is strictly ahead of `master`/`main`.
122
-
123
- Once the merge commit is pushed to `beta`, **semantic-release** will publish the pre-release version `3.0.0-beta.1` on the dist-tag `@beta`, which allow us to run our integration tests.
124
-
125
- The Git history of the repository is now:
126
-
127
- ```
128
- * feat: initial commit # => v1.0.0 on @latest
129
- | \
130
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
131
- | * feat: second feature # => v2.0.0-beta.2 on @beta
132
- * | fix: a fix # => v1.0.1 on @latest
133
- | | \
134
- | | * feat: first feature of other release \n\n BREAKING CHANGE: it breaks something # => v3.0.0-alpha.1 on @alpha
135
- | | * feat: second feature of other release # => v3.0.0-alpha.2 on @alpha
136
- | /| |
137
- * | | Merge branch beta into master/main # => v2.0.0 on @latest
138
- | | /|
139
- | * | Merge branch alpha into beta # => v3.0.0-beta.1 on @beta
140
- ```
141
-
142
- ## Publishing the 3.0.0 beta release to the default distribution channel
143
-
144
- Once we've developed and pushed all the feature we want to include in the future version `3.0.0` in the `beta` branch and all our tests are successful we can release it to our users.
145
-
146
- To do so we need to merge our changes made on `beta` into `master`/`main`. As `beta` and `master` branches have diverged, this merge might require to resolve conflicts.
147
-
148
- Once the conflicts are resolved and the merge commit is pushed to `master` or `main`, **semantic-release** will release the version `3.0.0` on the dist-tag `@latest`.
149
-
150
- The Git history of the repository is now:
151
-
152
- ```
153
- * feat: initial commit # => v1.0.0 on @latest
154
- | \
155
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
156
- | * feat: second feature # => v2.0.0-beta.2 on @beta
157
- * | fix: a fix # => v1.0.1 on @latest
158
- | | \
159
- | | * feat: first feature of other release \n\n BREAKING CHANGE: it breaks something # => v3.0.0-alpha.1 on @alpha
160
- | | * feat: second feature of other release # => v3.0.0-alpha.2 on @alpha
161
- | /| |
162
- * | | Merge branch beta into master/main # => v2.0.0 on @latest
163
- | | /|
164
- | * | Merge branch alpha into beta # => v3.0.0-beta.1 on @beta
165
- | /| |
166
- * | | Merge branch beta into master/main # => v3.0.0 on @latest
167
- ```
168
-
169
- ## Working on a third future release
170
-
171
- We can now start to work on a new future major release, version `4.0.0`, on the `@beta` distribution channel.
172
-
173
- To do so we first need to update the `beta` branch with all the changes from `master` or `main` (the commits `fix: a fix`). As `beta` and `master`/`main` branches have diverged, this merge might require to resolve conflicts.
174
-
175
- We can now commit our new feature on `beta`. When pushing that commit, **semantic-release** will publish the pre-release version `3.1.0-beta.1` on the dist-tag `@beta`. That allow us to run integration tests by installing our module with `npm install example-module@beta`. Other users installing with `npm install example-module` will still receive the version `3.0.0`.
176
-
177
- The Git history of the repository is now:
178
-
179
- ```
180
- * feat: initial commit # => v1.0.0 on @latest
181
- | \
182
- | * feat: first feature \n\n BREAKING CHANGE: it breaks something # => v2.0.0-beta.1 on @beta
183
- | * feat: second feature # => v2.0.0-beta.2 on @beta
184
- * | fix: a fix # => v1.0.1 on @latest
185
- | | \
186
- | | * feat: first feature of other release \n\n BREAKING CHANGE: it breaks something # => v3.0.0-alpha.1 on @alpha
187
- | | * feat: second feature of other release # => v3.0.0-alpha.2 on @alpha
188
- | /| |
189
- * | | Merge branch beta into master/main # => v2.0.0 on @latest
190
- | | /|
191
- | * | Merge branch alpha into beta # => v3.0.0-beta.1 on @beta
192
- | /| |
193
- * | | Merge branch beta into master/main # => v3.0.0 on @latest
194
- | \| |
195
- | * | Merge branch master/main into beta
196
- | * | feat: new feature # => v3.1.0-beta.1 on @beta
197
- ```