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.
- package/README.md +36 -37
- package/bin/semantic-release.js +1 -1
- package/index.js +265 -37
- package/lib/branches/expand.js +18 -0
- package/lib/branches/get-tags.js +39 -0
- package/lib/branches/index.js +71 -0
- package/lib/branches/normalize.js +104 -0
- package/lib/definitions/branches.js +22 -0
- package/lib/definitions/constants.js +8 -9
- package/lib/definitions/errors.js +303 -0
- package/lib/definitions/plugins.js +108 -0
- package/lib/get-commits.js +31 -0
- package/lib/get-config.js +98 -0
- package/lib/get-error.js +7 -0
- package/lib/get-git-auth-url.js +126 -0
- package/lib/get-last-release.js +48 -0
- package/lib/get-logger.js +19 -0
- package/lib/get-next-version.js +35 -0
- package/lib/get-release-to-add.js +59 -0
- package/lib/git.js +381 -0
- package/lib/hide-sensitive.js +14 -1
- package/lib/plugins/index.js +103 -0
- package/lib/plugins/normalize.js +69 -0
- package/lib/plugins/pipeline.js +59 -0
- package/lib/plugins/utils.js +81 -0
- package/lib/utils.js +101 -0
- package/lib/verify.js +43 -0
- package/package.json +20 -15
- package/docs/README.md +0 -7
- package/docs/developer-guide/README.md +0 -5
- package/docs/developer-guide/js-api.md +0 -294
- package/docs/developer-guide/plugin.md +0 -284
- package/docs/developer-guide/shareable-configuration.md +0 -1
- package/docs/extending/README.md +0 -4
- package/docs/extending/plugins-list.md +0 -233
- package/docs/extending/shareable-configurations-list.md +0 -22
- package/docs/recipes/ci-configurations/README.md +0 -7
- package/docs/recipes/ci-configurations/circleci-workflows.md +0 -49
- package/docs/recipes/ci-configurations/github-actions.md +0 -136
- package/docs/recipes/ci-configurations/gitlab-ci.md +0 -98
- package/docs/recipes/ci-configurations/jenkins-ci.md +0 -61
- package/docs/recipes/ci-configurations/travis.md +0 -97
- package/docs/recipes/git-hosted-services/README.md +0 -3
- package/docs/recipes/git-hosted-services/git-auth-ssh-keys.md +0 -166
- package/docs/recipes/release-workflow/README.md +0 -5
- package/docs/recipes/release-workflow/distribution-channels.md +0 -117
- package/docs/recipes/release-workflow/maintenance-releases.md +0 -157
- package/docs/recipes/release-workflow/pre-releases.md +0 -197
- package/docs/support/FAQ.md +0 -253
- package/docs/support/README.md +0 -7
- package/docs/support/git-version.md +0 -4
- package/docs/support/node-support-policy.md +0 -21
- package/docs/support/node-version.md +0 -38
- package/docs/support/resources.md +0 -22
- package/docs/support/troubleshooting.md +0 -70
- package/docs/usage/README.md +0 -9
- package/docs/usage/ci-configuration.md +0 -50
- package/docs/usage/configuration.md +0 -206
- package/docs/usage/getting-started.md +0 -8
- package/docs/usage/installation.md +0 -51
- package/docs/usage/plugins.md +0 -105
- package/docs/usage/shareable-configurations.md +0 -7
- package/docs/usage/workflow-configuration.md +0 -199
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
# Plugin Developer Guide
|
|
2
|
-
|
|
3
|
-
To create a plugin for `semantic-release`, you need to decide which parts of the release lifecycle are important to that plugin. For example, it is best to always have a `verifyConditions` step because you may be receiving inputs from a user and want to make sure they exist. A plugin can abide by any of the following lifecycles:
|
|
4
|
-
|
|
5
|
-
- `verifyConditions`
|
|
6
|
-
- `analyzeCommits`
|
|
7
|
-
- `verifyRelease`
|
|
8
|
-
- `generateNotes`
|
|
9
|
-
- `addChannel`
|
|
10
|
-
- `prepare`
|
|
11
|
-
- `publish`
|
|
12
|
-
- `success`
|
|
13
|
-
- `fail`
|
|
14
|
-
|
|
15
|
-
`semantic-release` will require the plugin via `node` and look through the required object for methods named like the lifecycles stated above. For example, if your plugin only had a `verifyConditions` and `success` step, the `main` file for your object would need to `export` an object with `verifyConditions` and `success` functions.
|
|
16
|
-
|
|
17
|
-
In addition to the lifecycle methods, each lifecycle is passed two objects:
|
|
18
|
-
|
|
19
|
-
1. `pluginConfig` - an object containing the options that a user may pass in via their `release.config.js` file (or similar)
|
|
20
|
-
2. `context` - provided by `semantic-release` for access to things like `env` variables set on the running process.
|
|
21
|
-
|
|
22
|
-
For each lifecycle you create, you will want to ensure it can accept `pluginConfig` and `context` as parameters.
|
|
23
|
-
|
|
24
|
-
## Creating a Plugin Project
|
|
25
|
-
|
|
26
|
-
It is recommended that you generate a new project with `yarn init`. This will provide you with a basic node project to get started with. From there, create an `index.js` file, and make sure it is specified as the `main` in the `package.json`. We will use this file to orchestrate the lifecycle methods later on.
|
|
27
|
-
|
|
28
|
-
Next, create a `src` or `lib` folder in the root of the project. This is where we will store our logic and code for how our lifecycle methods work. Finally, create a `test` folder so you can write tests related to your logic.
|
|
29
|
-
|
|
30
|
-
We recommend you setup a linting system to ensure good javascript practices are enforced. ESLint is usually the system of choice, and the configuration can be whatever you or your team fancies.
|
|
31
|
-
|
|
32
|
-
## Exposing Lifecycle Methods
|
|
33
|
-
|
|
34
|
-
In your `index.js` file, you can start by writing the following code
|
|
35
|
-
|
|
36
|
-
```javascript
|
|
37
|
-
const verify = require("./src/verify");
|
|
38
|
-
|
|
39
|
-
let verified;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Called by semantic-release during the verification step
|
|
43
|
-
* @param {*} pluginConfig The semantic-release plugin config
|
|
44
|
-
* @param {*} context The context provided by semantic-release
|
|
45
|
-
*/
|
|
46
|
-
async function verifyConditions(pluginConfig, context) {
|
|
47
|
-
await verify(pluginConfig, context);
|
|
48
|
-
verified = true;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
module.exports = { verifyConditions };
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Then, in your `src` folder, create a file called `verify.js` and add the following
|
|
55
|
-
|
|
56
|
-
```javascript
|
|
57
|
-
const AggregateError = require("aggregate-error");
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* A method to verify that the user has given us a slack webhook url to post to
|
|
61
|
-
*/
|
|
62
|
-
module.exports = async (pluginConfig, context) => {
|
|
63
|
-
const { logger } = context;
|
|
64
|
-
const errors = [];
|
|
65
|
-
|
|
66
|
-
// Throw any errors we accumulated during the validation
|
|
67
|
-
if (errors.length > 0) {
|
|
68
|
-
throw new AggregateError(errors);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
As of right now, this code won't do anything. However, if you were to run this plugin via `semantic-release`, it would run when the `verify` step occurred.
|
|
74
|
-
|
|
75
|
-
Following this structure, you can create different steps and checks to run through out the release process.
|
|
76
|
-
|
|
77
|
-
## Supporting Options
|
|
78
|
-
|
|
79
|
-
Let's say we want to verify that an `option` is passed. An `option` is a configuration object that is specific to your plugin. For example, the user may set an `option` in their release config like:
|
|
80
|
-
|
|
81
|
-
```js
|
|
82
|
-
{
|
|
83
|
-
prepare: {
|
|
84
|
-
path: "@semantic-release/my-special-plugin";
|
|
85
|
-
message: "My cool release message";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
This `message` option will be passed to the `pluginConfig` object mentioned earlier. We can use the validation method we created to verify this option exists so we can perform logic based on that knowledge. In our `verify` file, we can add the following:
|
|
91
|
-
|
|
92
|
-
```js
|
|
93
|
-
const { message } = pluginConfig;
|
|
94
|
-
|
|
95
|
-
if (message.length) {
|
|
96
|
-
//...
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Context
|
|
101
|
-
|
|
102
|
-
### Common context keys
|
|
103
|
-
|
|
104
|
-
- `stdout`
|
|
105
|
-
- `stderr`
|
|
106
|
-
- `logger`
|
|
107
|
-
|
|
108
|
-
### Context object keys by lifecycle
|
|
109
|
-
|
|
110
|
-
#### verifyConditions
|
|
111
|
-
|
|
112
|
-
Initially the context object contains the following keys (`verifyConditions` lifecycle):
|
|
113
|
-
|
|
114
|
-
- `cwd`
|
|
115
|
-
- Current working directory
|
|
116
|
-
- `env`
|
|
117
|
-
- Environment variables
|
|
118
|
-
- `envCi`
|
|
119
|
-
- Information about CI environment
|
|
120
|
-
- Contains (at least) the following keys:
|
|
121
|
-
- `isCi`
|
|
122
|
-
- Boolean, true if the environment is a CI environment
|
|
123
|
-
- `commit`
|
|
124
|
-
- Commit hash
|
|
125
|
-
- `branch`
|
|
126
|
-
- Current branch
|
|
127
|
-
- `options`
|
|
128
|
-
- Options passed to `semantic-release` via CLI, configuration files etc.
|
|
129
|
-
- `branch`
|
|
130
|
-
- Information on the current branch
|
|
131
|
-
- Object keys:
|
|
132
|
-
- `channel`
|
|
133
|
-
- `tags`
|
|
134
|
-
- `type`
|
|
135
|
-
- `name`
|
|
136
|
-
- `range`
|
|
137
|
-
- `accept`
|
|
138
|
-
- `main`
|
|
139
|
-
- `branches`
|
|
140
|
-
- Information on branches
|
|
141
|
-
- List of branch objects (see above)
|
|
142
|
-
|
|
143
|
-
#### analyzeCommits
|
|
144
|
-
|
|
145
|
-
Compared to the verifyConditions, `analyzeCommits` lifecycle context has keys
|
|
146
|
-
|
|
147
|
-
- `commits` (List)
|
|
148
|
-
- List of commits taken into account when determining the new version.
|
|
149
|
-
- Keys:
|
|
150
|
-
- `commit` (Object)
|
|
151
|
-
- Keys:
|
|
152
|
-
- `long` (String, Commit hash)
|
|
153
|
-
- `short` (String, Commit hash)
|
|
154
|
-
- `tree` (Object)
|
|
155
|
-
- Keys:
|
|
156
|
-
- `long` (String, Commit hash)
|
|
157
|
-
- `short` (String, Commit hash)
|
|
158
|
-
- `author` (Object)
|
|
159
|
-
- Keys:
|
|
160
|
-
- `name` (String)
|
|
161
|
-
- `email` (String)
|
|
162
|
-
- `date` (String, ISO 8601 timestamp)
|
|
163
|
-
- `committer` (Object)
|
|
164
|
-
- Keys:
|
|
165
|
-
- `name` (String)
|
|
166
|
-
- `email` (String)
|
|
167
|
-
- `date` (String, ISO 8601 timestamp)
|
|
168
|
-
- `subject` (String, Commit message subject)
|
|
169
|
-
- `body` (String, Commit message body)
|
|
170
|
-
- `hash` (String, Commit hash)
|
|
171
|
-
- `committerDate` (String, ISO 8601 timestamp)
|
|
172
|
-
- `message` (String)
|
|
173
|
-
- `gitTags` (String, List of git tags)
|
|
174
|
-
- `releases` (List)
|
|
175
|
-
- `lastRelease` (Object)
|
|
176
|
-
- Keys
|
|
177
|
-
- `version` (String)
|
|
178
|
-
- `gitTag` (String)
|
|
179
|
-
- `channels` (List)
|
|
180
|
-
- `gitHead` (String, Commit hash)
|
|
181
|
-
- `name` (String)
|
|
182
|
-
|
|
183
|
-
#### verifyRelease
|
|
184
|
-
|
|
185
|
-
Additional keys:
|
|
186
|
-
|
|
187
|
-
- `nextRelease` (Object)
|
|
188
|
-
- `type` (String)
|
|
189
|
-
- `channel` (String)
|
|
190
|
-
- `gitHead` (String, Git hash)
|
|
191
|
-
- `version` (String, version without `v`)
|
|
192
|
-
- `gitTag` (String, version with `v`)
|
|
193
|
-
- `name` (String)
|
|
194
|
-
|
|
195
|
-
#### generateNotes
|
|
196
|
-
|
|
197
|
-
No new content in the context.
|
|
198
|
-
|
|
199
|
-
#### addChannel
|
|
200
|
-
|
|
201
|
-
_This is run only if there are releases that have been merged from a higher branch but not added on the channel of the current branch._
|
|
202
|
-
|
|
203
|
-
Context content is similar to lifecycle `verifyRelease`.
|
|
204
|
-
|
|
205
|
-
#### prepare
|
|
206
|
-
|
|
207
|
-
Only change is that `generateNotes` has populated `nextRelease.notes`.
|
|
208
|
-
|
|
209
|
-
#### publish
|
|
210
|
-
|
|
211
|
-
No new content in the context.
|
|
212
|
-
|
|
213
|
-
#### success
|
|
214
|
-
|
|
215
|
-
Lifecycles `success` and `fail` are mutually exclusive, only one of them will be run.
|
|
216
|
-
|
|
217
|
-
Additional keys:
|
|
218
|
-
|
|
219
|
-
- `releases`
|
|
220
|
-
- Populated by `publish` lifecycle
|
|
221
|
-
|
|
222
|
-
#### fail
|
|
223
|
-
|
|
224
|
-
Lifecycles `success` and `fail` are mutually exclusive, only one of them will be run.
|
|
225
|
-
|
|
226
|
-
Additional keys:
|
|
227
|
-
|
|
228
|
-
- `errors`
|
|
229
|
-
|
|
230
|
-
### Supporting Environment Variables
|
|
231
|
-
|
|
232
|
-
Similar to `options`, environment variables exist to allow users to pass tokens and set special URLs. These are set on the `context` object instead of the `pluginConfig` object. Let's say we wanted to check for `GITHUB_TOKEN` in the environment because we want to post to GitHub on the user's behalf. To do this, we can add the following to our `verify` command:
|
|
233
|
-
|
|
234
|
-
```js
|
|
235
|
-
const { env } = context;
|
|
236
|
-
|
|
237
|
-
if (env.GITHUB_TOKEN) {
|
|
238
|
-
//...
|
|
239
|
-
}
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
## Logger
|
|
243
|
-
|
|
244
|
-
Use `context.logger` to provide debug logging in the plugin. Available logging functions: `log`, `warn`, `success`, `error`.
|
|
245
|
-
|
|
246
|
-
```js
|
|
247
|
-
const { logger } = context;
|
|
248
|
-
|
|
249
|
-
logger.log('Some message from plugin.').
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
The above usage yields the following where `PLUGIN_PACKAGE_NAME` is automatically inferred.
|
|
253
|
-
|
|
254
|
-
```
|
|
255
|
-
[3:24:04 PM] [semantic-release] [PLUGIN_PACKAGE_NAME] › ℹ Some message from plugin.
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
## Execution order
|
|
259
|
-
|
|
260
|
-
For the lifecycles, the list at the top of the readme contains the order. If there are multiple plugins for the same lifecycle, then the order of the plugins determines the order in which they are executed.
|
|
261
|
-
|
|
262
|
-
## Handling errors
|
|
263
|
-
|
|
264
|
-
In order to be able to detect and handle errors properly, the errors thrown from the must be of type [SemanticReleaseError](https://github.com/semantic-release/error) or extend it as described in the package readme. This way the errors are handled properly and plugins using the `fail` lifecycle receive the errors correctly. For any other types of errors the internal error handling does nothing, lets them through up until the final catch and does not call any `fail` plugins.
|
|
265
|
-
|
|
266
|
-
## Advanced
|
|
267
|
-
|
|
268
|
-
Knowledge that might be useful for plugin developers.
|
|
269
|
-
|
|
270
|
-
### Multiple analyzeCommits plugins
|
|
271
|
-
|
|
272
|
-
While it may be trivial that multiple analyzeCommits (or any lifecycle plugins) can be defined, it is not that self-evident that the plugins executed AFTER the first one (for example, the default one: `commit-analyzer`) can change the result. This way it is possible to create more advanced rules or situations, e.g. if none of the commits would result in new release, then a default can be defined.
|
|
273
|
-
|
|
274
|
-
The commit must be a known release type, for example the commit-analyzer has the following default types:
|
|
275
|
-
|
|
276
|
-
- major
|
|
277
|
-
- premajor
|
|
278
|
-
- minor
|
|
279
|
-
- preminor
|
|
280
|
-
- patch
|
|
281
|
-
- prepatch
|
|
282
|
-
- prerelease
|
|
283
|
-
|
|
284
|
-
If the analyzeCommits-lifecycle plugin does not return anything, then the earlier result is used, but if it returns a supported string value, then that overrides the previous result.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Shareable configuration developer guide
|
package/docs/extending/README.md
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
# Plugins list
|
|
2
|
-
|
|
3
|
-
## Official plugins
|
|
4
|
-
|
|
5
|
-
- [@semantic-release/commit-analyzer](https://github.com/semantic-release/commit-analyzer)
|
|
6
|
-
- **Note**: this is already part of semantic-release and does not have to be installed separately
|
|
7
|
-
- `analyzeCommits`: Determine the type of release by analyzing commits with [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)
|
|
8
|
-
- [@semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator)
|
|
9
|
-
- **Note**: this is already part of semantic-release and does not have to be installed separately
|
|
10
|
-
- `generateNotes`: Generate release notes for the commits added since the last release with [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)
|
|
11
|
-
- [@semantic-release/github](https://github.com/semantic-release/github)
|
|
12
|
-
- **Note**: this is already part of semantic-release and does not have to be installed separately
|
|
13
|
-
- `verifyConditions`: Verify the presence and the validity of the GitHub authentication and release configuration
|
|
14
|
-
- `publish`: Publish a [GitHub release](https://help.github.com/articles/about-releases)
|
|
15
|
-
- `success`: Add a comment to GitHub issues and pull requests resolved in the release
|
|
16
|
-
- `fail`: Open a GitHub issue when a release fails
|
|
17
|
-
- [@semantic-release/npm](https://github.com/semantic-release/npm)
|
|
18
|
-
- **Note**: this is already part of semantic-release and does not have to be installed separately
|
|
19
|
-
- `verifyConditions`: Verify the presence and the validity of the npm authentication and release configuration
|
|
20
|
-
- `prepare`: Update the package.json version and create the npm package tarball
|
|
21
|
-
- `publish`: Publish the package on the npm registry
|
|
22
|
-
- [@semantic-release/gitlab](https://github.com/semantic-release/gitlab)
|
|
23
|
-
- `verifyConditions`: Verify the presence and the validity of the GitLab authentication and release configuration
|
|
24
|
-
- `publish`: Publish a [GitLab release](https://docs.gitlab.com/ee/user/project/releases/)
|
|
25
|
-
- [@semantic-release/git](https://github.com/semantic-release/git)
|
|
26
|
-
- `verifyConditions`: Verify the presence and the validity of the Git authentication and release configuration
|
|
27
|
-
- `prepare`: Push a release commit and tag, including configurable files
|
|
28
|
-
- [@semantic-release/changelog](https://github.com/semantic-release/changelog)
|
|
29
|
-
- `verifyConditions`: Verify the presence and the validity of the configuration
|
|
30
|
-
- `prepare`: Create or update the changelog file in the local project repository
|
|
31
|
-
- [@semantic-release/exec](https://github.com/semantic-release/exec)
|
|
32
|
-
- `verifyConditions`: Execute a shell command to verify if the release should happen
|
|
33
|
-
- `analyzeCommits`: Execute a shell command to determine the type of release
|
|
34
|
-
- `verifyRelease`: Execute a shell command to verifying a release that was determined before and is about to be published
|
|
35
|
-
- `generateNotes`: Execute a shell command to generate the release note
|
|
36
|
-
- `prepare`: Execute a shell command to prepare the release
|
|
37
|
-
- `publish`: Execute a shell command to publish the release
|
|
38
|
-
- `success`: Execute a shell command to notify of a new release
|
|
39
|
-
- `fail`: Execute a shell command to notify of a failed release
|
|
40
|
-
- [@semantic-release/apm](https://github.com/semantic-release/apm)
|
|
41
|
-
- `verifyConditions`: Verify the presence of the `ATOM_ACCESS_TOKEN` environment variable and the [`apm`](https://github.com/atom/apm) CLI
|
|
42
|
-
- `prepare`: Update the `package.json` version with [`npm version`](https://docs.npmjs.com/cli/version)
|
|
43
|
-
- `publish`: Publish the [Atom package](https://flight-manual.atom.io/hacking-atom/sections/publishing)
|
|
44
|
-
|
|
45
|
-
## Community plugins
|
|
46
|
-
|
|
47
|
-
[Open a Pull Request](https://github.com/semantic-release/semantic-release/blob/master/CONTRIBUTING.md#submitting-a-pull-request) to add your plugin to the list.
|
|
48
|
-
|
|
49
|
-
- [semantic-release-slack-bot](https://github.com/juliuscc/semantic-release-slack-bot)
|
|
50
|
-
- `verifyConditions`: Verify that the environment variable `SLACK_WEBHOOK` has been defined.
|
|
51
|
-
- `success`: Publish a message about the success to a slack channel.
|
|
52
|
-
- `fail`: Optionally publish a message about failure to a slack channel.
|
|
53
|
-
- [semantic-release-docker](https://github.com/felixfbecker/semantic-release-docker)
|
|
54
|
-
- `verifyConditions`: Verify that all needed configuration is present and login to the Docker registry.
|
|
55
|
-
- `publish`: Tag the image specified by `name` with the new version, push it to Docker Hub and update the latest tag
|
|
56
|
-
- [@semantic-release-plus/docker](https://github.com/semantic-release-plus/semantic-release-plus/tree/master/packages/plugins/docker)
|
|
57
|
-
- `verifyConditions`: Verify that all needed configuration is present and login to the configured docker registry.
|
|
58
|
-
- `publish`: Tag the image specified by `name` with the new version and channel and push it to the configured docker registry.
|
|
59
|
-
- `addChannel`: Updates a release published on one channel with the destinations channel tag and pushes to the registry i.e.: next to latest.
|
|
60
|
-
- [semantic-release-gcr](https://github.com/carlos-cubas/semantic-release-gcr)
|
|
61
|
-
- `verifyConditions`: Verify that all needed configuration is present and login to the Docker registry
|
|
62
|
-
- `publish`: Tag the image specified by `name` with the new version, push it to Docker Hub and update the latest tag
|
|
63
|
-
- [semantic-release-vsce](https://github.com/raix/semantic-release-vsce)
|
|
64
|
-
- `verifyConditions`: Verify the presence and the validity of the "VS Code extension" authentication and release configuration
|
|
65
|
-
- `prepare`: Create a `.vsix` for distribution
|
|
66
|
-
- `publish`: Publish the package to the Visual Studio Code marketplace
|
|
67
|
-
- [semantic-release-verify-deps](https://github.com/piercus/semantic-release-verify-deps)
|
|
68
|
-
- `verifyConditions`: Check the dependencies format against a regexp before a release
|
|
69
|
-
- [semantic-release-openapi](https://github.com/aensley/semantic-release-openapi)
|
|
70
|
-
- `verifyConditions`: Verify `apiSpecFiles` is specified with at least one file name and all matching files have a .json, .yaml, or .yml extension.
|
|
71
|
-
- `prepare`: Write the correct version to all OpenAPI / Swagger files specified in `apiSpecFiles`.
|
|
72
|
-
- [semantic-release-chrome](https://github.com/GabrielDuarteM/semantic-release-chrome)
|
|
73
|
-
- `verifyConditions`: Verify the presence of the authentication (set via environment variables)
|
|
74
|
-
- `prepare`: Write the correct version to the `manifest.json` and creates a zip file of the whole dist folder
|
|
75
|
-
- `publish`: Uploads the generated zip file to the webstore, and publish the item
|
|
76
|
-
- [semantic-release-firefox-add-on](https://github.com/tophat/semantic-release-firefox-add-on)
|
|
77
|
-
- `verifyConditions`: Verify that all required options are present and authentication is set via environment variables
|
|
78
|
-
- `prepare`: Write the correct version to the `manifest.json`
|
|
79
|
-
- `publish`: Creates an unsigned `.xpi` file, and submits it to the Mozilla Add On store for signing. Once the package is signed, downloads the signed `.xpi` to a local directory
|
|
80
|
-
- [semantic-release-gerrit](https://github.com/pascalMN/semantic-release-gerrit)
|
|
81
|
-
- `generateNotes`: Generate release notes with Gerrit reviews URL
|
|
82
|
-
- [semantic-release-expo](https://github.com/bycedric/semantic-release-expo)
|
|
83
|
-
- `verifyConditions`: Verify Expo manifest(s) are readable and valid.
|
|
84
|
-
- `prepare`: Update version, ios build number and android version code in the Expo manifest(s).
|
|
85
|
-
- [maven-semantic-release](https://github.com/conveyal/maven-semantic-release)
|
|
86
|
-
- `verifyConditions`: Verifies that the `pom.xml` file and other files exist and are setup to allow releases
|
|
87
|
-
- `verifyRelease`: Checks and warns (does not error by default) if the version numbers found on maven central and within the Git project differ by quite a bit
|
|
88
|
-
- `prepare`: Changes the version number in the `pom.xml` (or all `pom.xml` files in maven projects with multiple `pom.xml` files) and optionally creates a commit with this version number and pushes it to `master`
|
|
89
|
-
- `publish`: Runs `mvn deploy` to deploy to maven central and optionally will update to next snapshot version and merge changes to development branch
|
|
90
|
-
- [maven-semantic-release](https://github.com/terrestris/maven-semantic-release) (alternative version)
|
|
91
|
-
- `verifyConditions`: Verifies that the `mvn` command exists.
|
|
92
|
-
- `prepare`: Changes version number in `pom.xml` and optionally in all child modules.
|
|
93
|
-
- `publish`: Runs one of the mvn targets `deploy`, `package jib:build` or `deploy jib:build`.
|
|
94
|
-
- `success`: Optionally sets new snapshot version and commits it.
|
|
95
|
-
- [semantic-release-ado](https://github.com/lluchmk/semantic-release-ado)
|
|
96
|
-
- `prepare`: Stores the version number as an Azure DevOps pipeline variable available to downstream steps on the job
|
|
97
|
-
- [gradle-semantic-release](https://github.com/KengoTODA/gradle-semantic-release-plugin)
|
|
98
|
-
- `verifyConditions`: Verify that project has a Gradle wrapper script, and `build.gradle` contains a task to publish artifacts.
|
|
99
|
-
- `prepare`: Changes the version number in the `gradle.properties`
|
|
100
|
-
- `publish`: Triggers Gradle to publish artifacts.
|
|
101
|
-
- [semantic-release-circleci-orb](https://github.com/matt-oakes/semantic-release-circleci-orb)
|
|
102
|
-
- `verifyConditions`: Verify the presence of the `CIRCLECI_API_TOKEN` environment variable, `orbName` option, and the `circleci` CLI.
|
|
103
|
-
- `publish`: Publish the CircleCI orb.
|
|
104
|
-
- [semantic-release-github-pages](https://github.com/qiwi/semantic-release-gh-pages-plugin)
|
|
105
|
-
- `verifyConditions`: Verify the presence of the auth token set via environment variables.
|
|
106
|
-
- `publish`: Pushes commit to the documentation branch.
|
|
107
|
-
- [semantic-release-github-pullrequest](https://github.com/asbiin/semantic-release-github-pullrequest)
|
|
108
|
-
- `verifyConditions`: Verify the presence and the validity of the GitHub authentication and other configuration.
|
|
109
|
-
- `publish`: Create a branch to upload all assets and create the pull request on the base branch on GitHub.
|
|
110
|
-
- [leiningen-semantic-release](https://github.com/NoxHarmonium/leiningen-semantic-release)
|
|
111
|
-
- `verifyConditions`: Checks the project.clj is syntactically valid.
|
|
112
|
-
- `prepare`: Update the project.clj version and package the output jar file.
|
|
113
|
-
- `publish`: Publish the jar (and generated Maven metadata) to a maven repository (or clojars).
|
|
114
|
-
- [@saithodev/semantic-release-gitea](https://github.com/saitho/semantic-release-gitea)
|
|
115
|
-
- `verifyConditions`: Verify the presence and the validity of the authentication and the assets option configuration.
|
|
116
|
-
- `publish`: Publish a Gitea release, optionally uploading file assets.
|
|
117
|
-
- `addChannel`: Update a Gitea release's pre-release field.
|
|
118
|
-
- [semantic-release-replace-plugin](https://github.com/jpoehnelt/semantic-release-replace-plugin)
|
|
119
|
-
- `prepare`: Replace version strings in files using regex and glob.
|
|
120
|
-
- [semantic-release-rubygem](https://github.com/Gusto/semantic-release-rubygem)
|
|
121
|
-
- `verifyConditions`: Locate and validate a `.gemspec` file, locate and validate a `lib/**/version.rb` file, verify the presence of the `GEM_HOST_API_KEY` environment variable, and create a credentials file with the API key.
|
|
122
|
-
- `prepare`: Update the version in the `lib/**/version.rb` version file and [build](https://guides.rubygems.org/command-reference/#gem-build) the gem.
|
|
123
|
-
- `publish`: [Push the Ruby gem](https://guides.rubygems.org/command-reference/#gem-push) to the gem server.
|
|
124
|
-
- [semantic-release-npm-deprecate-old-versions](https://github.com/ghusse/semantic-release-npm-deprecate-old-versions)
|
|
125
|
-
- `verifyConditions`: Validates configuration.
|
|
126
|
-
- `publish`: Deprecates old versions, based on the declaration of supported versions in the config.
|
|
127
|
-
- [amanda-mitchell/semantic-release-npm-multiple](https://github.com/amanda-mitchell/semantic-release-npm-multiple)
|
|
128
|
-
- **Note**: this is a thin wrapper around the built-in npm plugin that can target multiple registries
|
|
129
|
-
- `verifyConditions`: Verify the presence and the validity of the npm authentication and release configuration for multiple registries
|
|
130
|
-
- `prepare`: Update the package.json version and create the npm package tarball
|
|
131
|
-
- `publish`: Publish the package on the npm registry for multiple registries
|
|
132
|
-
- [semantic-release-license](https://github.com/cbhq/semantic-release-license) Automatically update dates and more in your license file for new releases.
|
|
133
|
-
- `verifyConditions`: Verify the presence of a license file
|
|
134
|
-
- `prepare`: Update the license file based on its type
|
|
135
|
-
- [semantic-release-pypi](https://github.com/abichinger/semantic-release-pypi)
|
|
136
|
-
- `verifyConditions`: Verify the environment variable `PYPI_TOKEN` and installation of build tools
|
|
137
|
-
- `prepare`: Update the version in `setup.cfg` and create the distribution packages
|
|
138
|
-
- `publish`: Publish the python package to a repository (default: pypi)
|
|
139
|
-
- [@covage/semantic-release-poetry-plugin](https://github.com/covage/semantic-release-poetry-plugin)
|
|
140
|
-
- `verifyConditions`: Verify the presence and validity of `pyproject.toml` file.
|
|
141
|
-
- `prepare`: Update the version in `pyproject.toml`.
|
|
142
|
-
- [semantic-release-codeartifact](https://github.com/ryansonshine/semantic-release-codeartifact)
|
|
143
|
-
- `verifyConditions`: Validate configuration, get AWS CodeArtifact authentication and repository, validate `publishConfig` or `.npmrc` (if they exist), then pass the configuration to the associated plugins.
|
|
144
|
-
- [semantic-release-telegram](https://github.com/pustovitDmytro/semantic-release-telegram)
|
|
145
|
-
- `verifyConditions`: Validate configuration and verify `TELEGRAM_BOT_ID` and `TELEGRAM_BOT_TOKEN`
|
|
146
|
-
- `success`: Publish a message about the successful release to a telegram chat
|
|
147
|
-
- `fail`: publish a message about failure to a telegram chat
|
|
148
|
-
- [semantic-release-heroku](https://github.com/pustovitDmytro/semantic-release-heroku)
|
|
149
|
-
- `verifyConditions`: Validate configuration and verify `HEROKU_API_KEY`
|
|
150
|
-
- `prepare`: Update the package.json version and create release tarball
|
|
151
|
-
- `publish`: Publish version to heroku
|
|
152
|
-
- [semantic-release-mattermost](https://github.com/ttrobisch/semantic-release-mattermost)
|
|
153
|
-
- `verifyConditions`: Verify that the webhook is setup and release-notes-generator is present.
|
|
154
|
-
- `success`: Send a message about the new release and its notes to a [mattermost](https://mattermost.com/) webhook.
|
|
155
|
-
- [semantic-release-github-milestones](https://github.com/nitzano/semantic-release-github-milestones)
|
|
156
|
-
- `verifyConditions`: Verify github tokens are present and valid.
|
|
157
|
-
- `verifyRelease`: Display information regarding the matching github milestone.
|
|
158
|
-
- [semantic-release-telegram-bot](https://github.com/skoropadas/semantic-release-telegram-bot)
|
|
159
|
-
- `verifyConditions`: Validate configuration and verify `TELEGRAM_BOT_TOKEN` and package name
|
|
160
|
-
- `success`: Publish a success message to certain telegram chats
|
|
161
|
-
- `fail`: Publish a fail message to certain telegram chats
|
|
162
|
-
- [semantic-release-npm-deprecate](https://github.com/jpoehnelt/semantic-release-npm-deprecate)
|
|
163
|
-
- `publish`: Automatically mark old versions as deprecated.
|
|
164
|
-
- [semantic-release-mirror-version](https://github.com/GarthDB/semantic-release-mirror-version)
|
|
165
|
-
- `prepare`: Update the version number in any file that matches the defined [file glob](https://github.com/isaacs/node-glob).
|
|
166
|
-
- [semantic-release-space](https://github.com/123FLO321/semantic-release-space)
|
|
167
|
-
- `verifyConditions` Verifies that all required options are set.
|
|
168
|
-
- `prepare` Creates a JetBrains Space Deployment Target if it does not yet exist.
|
|
169
|
-
- `publish` Starts a JetBrains Space Deployment.
|
|
170
|
-
- `success` Marks the JetBrains Space Deployment as completed.
|
|
171
|
-
- `fail` Marks the JetBrains Space Deployment as failed.
|
|
172
|
-
- [semantic-release-react-native](https://github.com/alexandermendes/semantic-release-react-native)
|
|
173
|
-
- `verifyConditions` Validate configuration.
|
|
174
|
-
- `prepare` Version native iOS and Android files.
|
|
175
|
-
- [semantic-release-cargo](https://github.com/buehler/semantic-release-cargo)
|
|
176
|
-
- `verifyConditions` Validate configuration, `Cargo.toml`, and local cargo executable. Also, logs in into `crates.io`.
|
|
177
|
-
- `prepare` Write the new version number into `Cargo.toml` file and perform `cargo check` if configured.
|
|
178
|
-
- `publish` Publish the Rust crate to `crates.io`
|
|
179
|
-
- [semantic-release-coralogix](https://github.com/adobe/semantic-release-coralogix)
|
|
180
|
-
- `verifyConditions` Verified that required credentials are provided and API is accessible
|
|
181
|
-
- `publish` add a release tag to Coralogix
|
|
182
|
-
- [semantic-release-jira-notes](https://github.com/iamludal/semantic-release-jira-notes)
|
|
183
|
-
- `verifyConditions`: Validate the config options.
|
|
184
|
-
- `generateNotes`: Generate the release notes with links to JIRA issues.
|
|
185
|
-
- [semantic-release-major-tag](https://github.com/doteric/semantic-release-major-tag)
|
|
186
|
-
- `success` Create major version tag, for example `v1`.
|
|
187
|
-
- [semantic-release-yarn](https://github.com/hongaar/semantic-release-yarn)
|
|
188
|
-
- **Note**: this is an alternative to the default `@semantic-release/npm` plugin and adds support for monorepos.
|
|
189
|
-
- `verifyConditions` Verify Yarn 2 or higher is installed, verify the presence of a NPM auth token (either in an environment variable or a `.yarnrc.yml` file) and verify the authentication method is valid.
|
|
190
|
-
- `prepare` Update the `package.json` version and create the package tarball.
|
|
191
|
-
- `addChannel` Add a tag for the release.
|
|
192
|
-
- `publish` Publish to the npm registry.
|
|
193
|
-
- [semantic-release-pub](https://github.com/zeshuaro/semantic-release-pub)
|
|
194
|
-
- `verifyConditions`: Verify the presence of the `pub.dev` authentication and release configuration
|
|
195
|
-
- `prepare`: Update the `pubspec.yaml` version
|
|
196
|
-
- `publish`: Publish the package onto the `pub.dev` registry
|
|
197
|
-
- [semantic-release-hackage](https://github.com/stackbuilders/semantic-release-hackage)
|
|
198
|
-
- `verifyConditions`: Verify the environment variable `HACKAGE_TOKEN`
|
|
199
|
-
- `prepare`: Update the version of .cabal file and create the distribution package (.tar)
|
|
200
|
-
- `publish`: Publish the release candidate to the specified repository in Hackage
|
|
201
|
-
- [semantic-release-pull-request-analyzer](https://github.com/bobvanderlinden/semantic-release-pull-request-analyzer)
|
|
202
|
-
- `verifyConditions` Verify configuration options and existance of GitHub token.
|
|
203
|
-
- `analyzeCommits` Determine the type of release by analyzing merged GitHub pull requests and their labels.
|
|
204
|
-
- `generateNotes` Generates release notes using [GitHub release notes generator](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes).
|
|
205
|
-
- [semantic-release-commits-lint](https://github.com/BondarenkoAlex/semantic-release-commits-lint)
|
|
206
|
-
- `analyzeCommits` Analyzing commit messages by [commitlint](https://github.com/conventional-changelog/commitlint).
|
|
207
|
-
- [semantic-release-kaniko](https://github.com/brendangeck/semantic-release-kaniko)
|
|
208
|
-
- `verifyConditions`: Verify that all needed configuration is present and login to the Docker registry.
|
|
209
|
-
- `publish`: Build a container image using [Kaniko](https://github.com/GoogleContainerTools/kaniko) and (optionally) push it to a Docker registry.
|
|
210
|
-
- [semantic-release-skopeo](https://github.com/LukasWestholt/semantic-release-skopeo)
|
|
211
|
-
- `verifyConditions`: Verify that all needed configuration is present and check if destination is writeable (unless force=true).
|
|
212
|
-
- `publish`: Copy OCI images to a custom (Docker) registry using daemonless open-source tool [skopeo](https://github.com/containers/skopeo/).
|
|
213
|
-
- [sr-uv-plugin](https://github.com/Artessan-Devs/sr-uv-plugin)
|
|
214
|
-
- `verifyConditions`: Ensures `pyproject.toml` exists and contains a `[project]` section.
|
|
215
|
-
- `prepare`: Updates the `[project].version` field in `pyproject.toml` to match the release version.
|
|
216
|
-
- [semantic-release-uv](https://github.com/Deltamir/semantic-release-uv)
|
|
217
|
-
- `verifyConditions`: Verify the presence and validity of a `PYPI_TOKEN` and validate the `pyproject.toml` structure
|
|
218
|
-
- `prepare`: Update the version in `pyproject.toml`, locking and build the distribution with `uv`
|
|
219
|
-
- `publish`: Publish the package to PyPI or a custom index using `uv publish`
|
|
220
|
-
- [@jno21/semantic-release-github-commit](https://github.com/Jno21/semantic-release-github-commit)
|
|
221
|
-
- **Notes**: This plugin creates a commit on GitHub using the GitHub API, enabling signed commits via a GitHub App.
|
|
222
|
-
- `verifyConditions`: Verify GitHub authentication and configuration.
|
|
223
|
-
- `prepare`: Create a commit with the specified files using the GitHub API.
|
|
224
|
-
- [semantic-release-minecraft](https://github.com/pynickle/semantic-release)
|
|
225
|
-
- `verifyConditions`: Verify that all needed configuration is present.
|
|
226
|
-
- `prepare`: Convert different types of CurseForge game versions to their corresponding IDs.
|
|
227
|
-
- `publish`: Publish the Minecraft project to CurseForge and Modrinth.
|
|
228
|
-
- [semantic-release-jira-fixversion](https://github.com/danbka33/semantic-release-jira-fixversion)
|
|
229
|
-
- `verifyConditions`: Verify Jira Server/Data Center connectivity, authentication, and plugin configuration.
|
|
230
|
-
- `success`: Create or reuse Jira Versions for affected projects, update `fixVersions`, add release comments to referenced issues, and transition them to the configured workflow state.
|
|
231
|
-
- [semantic-release-linear-issue-status](https://github.com/noahlaux/semantic-release-linear-issue-status)
|
|
232
|
-
- `verifyConditions`: Verify the presence of the `LINEAR_API_KEY` environment variable and required configuration options (`teamKey`, `issuePrefixes`).
|
|
233
|
-
- `success`: Move linked [Linear](https://linear.app) issues to a completed workflow state after a successful release, based on issue identifiers found in release commits.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Shareable configurations list
|
|
2
|
-
|
|
3
|
-
## Official configurations
|
|
4
|
-
|
|
5
|
-
- [@semantic-release/apm-config](https://github.com/semantic-release/apm-config) - semantic-release shareable configuration for releasing atom packages
|
|
6
|
-
- [@semantic-release/gitlab-config](https://github.com/semantic-release/gitlab-config) - semantic-release shareable configuration for GitLab
|
|
7
|
-
|
|
8
|
-
## Community configurations
|
|
9
|
-
|
|
10
|
-
- [@jedmao/semantic-release-npm-github-config](https://github.com/jedmao/semantic-release-npm-github-config)
|
|
11
|
-
- Provides an informative [Git](https://github.com/semantic-release/git) commit message for the release commit that does not trigger continuous integration and conforms to the [conventional commits specification](https://www.conventionalcommits.org/) (e.g., `chore(release): 1.2.3 [skip ci]\n\nnotes`).
|
|
12
|
-
- Creates a tarball that gets uploaded with each [GitHub release](https://github.com/semantic-release/github).
|
|
13
|
-
- Publishes the same tarball to [npm](https://github.com/semantic-release/npm).
|
|
14
|
-
- Commits the version change in `package.json`.
|
|
15
|
-
- Creates or updates a [changelog](https://github.com/semantic-release/changelog) file.
|
|
16
|
-
- [semantic-release-npm-github-publish](https://github.com/oleg-koval/semantic-release-npm-github-publish)
|
|
17
|
-
- Based on [angular preset](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
|
|
18
|
-
- Adds more keywords for the `chore` **PATCH** release.
|
|
19
|
-
- Generates or updates a [changelog](https://github.com/semantic-release/changelog) file including all **PATCH** keywords (not included in default angular package).
|
|
20
|
-
- Updates GitHub release with release-notes.
|
|
21
|
-
- Bumps a version in package.json.
|
|
22
|
-
- Publishes the new version to [NPM](https://npmjs.org).
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Using semantic-release with [CircleCI 2.0 workflows](https://circleci.com/docs/2.0/workflows)
|
|
2
|
-
|
|
3
|
-
## Environment variables
|
|
4
|
-
|
|
5
|
-
The [Authentication](../../usage/ci-configuration.md#authentication) environment variables can be configured in [CircleCi Project Settings](https://circleci.com/docs/2.0/env-vars/#adding-environment-variables-in-the-app)..
|
|
6
|
-
|
|
7
|
-
Alternatively, the default `NPM_TOKEN` and `GH_TOKEN` can be easily [setup with semantic-release-cli](../../usage/getting-started.md#getting-started).
|
|
8
|
-
|
|
9
|
-
## Multiple Node jobs configuration
|
|
10
|
-
|
|
11
|
-
### `.circleci/config.yml` configuration for multiple Node jobs
|
|
12
|
-
|
|
13
|
-
This example is a minimal configuration for **semantic-release** with tests running against Node 16 and 14.
|
|
14
|
-
See [CircleCI documentation](https://circleci.com/docs/2.0) for additional configuration options.
|
|
15
|
-
|
|
16
|
-
In this example, the [`circleci/node`](https://circleci.com/developer/orbs/orb/circleci/node) orb is imported (Which makes some node operations easier), then a `release` job is defined which will run `semantic-release`.
|
|
17
|
-
|
|
18
|
-
To run our `release` job, we have created a workflow named `test_and_release` which will run two jobs, `node/test`, which comes from the node orb and will test our application, and our release job.
|
|
19
|
-
Here, we are actually making use of [matrix jobs](https://circleci.com/blog/circleci-matrix-jobs/) so that our single `node/test` job will actually be executed twice, once for Node version 16, and once for version 14.
|
|
20
|
-
Finally, we call our release job with a `requires` parameter so that `release` will run against the latest LTS version of node, only after `node/test` has successfully tested against v14 and v16.
|
|
21
|
-
|
|
22
|
-
```yaml
|
|
23
|
-
version: 2.1
|
|
24
|
-
orbs:
|
|
25
|
-
node: circleci/node@5.0.0
|
|
26
|
-
jobs:
|
|
27
|
-
release:
|
|
28
|
-
executor: node/default
|
|
29
|
-
steps:
|
|
30
|
-
- checkout
|
|
31
|
-
- node/install-packages # Install and automatically cache packages
|
|
32
|
-
# Run optional required steps before releasing
|
|
33
|
-
# - run: npm run build-script
|
|
34
|
-
- run: npx semantic-release
|
|
35
|
-
|
|
36
|
-
workflows:
|
|
37
|
-
test_and_release:
|
|
38
|
-
# Run the test jobs first, then the release only when all the test jobs are successful
|
|
39
|
-
jobs:
|
|
40
|
-
- node/test:
|
|
41
|
-
matrix:
|
|
42
|
-
parameters:
|
|
43
|
-
version:
|
|
44
|
-
- 16.1.0
|
|
45
|
-
- 14.17.0
|
|
46
|
-
- release:
|
|
47
|
-
requires:
|
|
48
|
-
- node/test
|
|
49
|
-
```
|