You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING CHANGE: removed commitlint from semantic-releases and added all rules to the new commitlint-config package
Signed-off-by: prisis <d.bannert@anolilab.de>
Copy file name to clipboardexpand all lines: packages/semantic-release-preset/README.md
+36-24
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
-
# Semantic-release shareable configuration
2
-
3
-
Semantic-release shareable configuration to publish GitHub projects.
4
-
5
1
<divalign="center">
2
+
<h1>Shareable semantic-release configuration</h1>
3
+
4
+
A shareable [semantic-release](https://github.com/semantic-release/semantic-release) configuration, for enforcing consistent GitHub/NPM releases in your projects.
This shareable configuration uses the following plugins:
42
+
We use the following plugins within the Semantic Release ecosystem:
32
43
33
44
-[@semantic-release/changelog][3]
34
45
-[@semantic-release/commit-analyzer][1]
@@ -52,7 +63,11 @@ This shareable configuration performs the following actions:
52
63
53
64
## Usage
54
65
55
-
When installing this package for the first time, the following shareable configuration (.releaserc.json) is automatically added to your project root folder:
66
+
When installing this package for the first time, the following shareable configuration `.releaserc.json` is automatically added to your project folder:
67
+
68
+
> Note: If the script detects an existing `.releaserc.json` file, it will not overwrite it.
69
+
70
+
> Note: It can happen that the postinstall script dont run, then you have to add the `.releaserc.json` manually.
56
71
57
72
With npm:
58
73
@@ -69,10 +84,10 @@ Without npm:
69
84
"extends": "@anolilab/semantic-release-preset"
70
85
}
71
86
```
87
+
<details>
88
+
<summary>File content of the extended preset</summary>
Ensure that your CI configuration has the following environment variables set:
137
143
138
144
- GITHUB_TOKEN: [A GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
145
+
- When a new release is published, this plugin will try to commit and push into the released branch. Ensure that the user that is running the release has push rights and can bypass branch protection rules.
139
146
- NPM_TOKEN: [A npm personal access token](https://www.npmjs.com/package/settings)
147
+
- A NPM token so the package can be published to NPM (a .npmrc file with extra configuration can also be used)
140
148
141
149
You can test your config with a dry run:
142
150
143
151
```sh
144
152
npx semantic-release --dry-run
145
153
```
146
154
147
-
What you’ll want to do next is configure a [GitHub workflow](https://docs.github.com/en/actions/quickstart) to run your tests and publish new versions automatically.
155
+
## GitHub workflows
156
+
157
+
If you're [configuring a GitHub workflow](https://help.github.com/en/articles/configuring-a-workflow) you might want to do a test build matrix first and then publish only if those tests succeed across all environments.
158
+
The following will do just that, immediately after something is merged into `main`.
148
159
149
160
Here’s an example workflow configuration that runs your tests and publishes a new version for new commits on `main` branch:
0 commit comments