semantic-release 19.0.2 → 19.0.3
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/docs/recipes/ci-configurations/circleci-workflows.md +1 -3
- package/docs/usage/ci-configuration.md +2 -2
- package/index.js +2 -1
- package/lib/branches/index.js +1 -0
- package/lib/definitions/branches.js +1 -0
- package/lib/get-git-auth-url.js +1 -1
- package/lib/git.js +2 -2
- package/package.json +3 -2
|
@@ -22,14 +22,12 @@ Finally, we call our release job with a `requires` parameter so that `release` w
|
|
|
22
22
|
```yaml
|
|
23
23
|
version: 2.1
|
|
24
24
|
orbs:
|
|
25
|
-
node: circleci/node@
|
|
25
|
+
node: circleci/node@5.0.0
|
|
26
26
|
jobs:
|
|
27
27
|
release:
|
|
28
28
|
executor: node/default
|
|
29
29
|
steps:
|
|
30
30
|
- checkout
|
|
31
|
-
- node/install
|
|
32
|
-
lts: true
|
|
33
31
|
- node/install-packages # Install and automatically cache packages
|
|
34
32
|
# Run optional required steps before releasing
|
|
35
33
|
# - run: npm run build-script
|
|
@@ -13,7 +13,7 @@ Here is a few example of the CI services that can be used to achieve this:
|
|
|
13
13
|
- [Wercker Workflows](http://devcenter.wercker.com/docs/workflows)
|
|
14
14
|
- [GoCD Pipelines](https://docs.gocd.org/current/introduction/concepts_in_go.html#pipeline).
|
|
15
15
|
|
|
16
|
-
See [CI configuration recipes](../recipes/ci-configurations
|
|
16
|
+
See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details.
|
|
17
17
|
|
|
18
18
|
## Authentication
|
|
19
19
|
|
|
@@ -44,6 +44,6 @@ See each plugin's documentation for the environment variables required.
|
|
|
44
44
|
|
|
45
45
|
The authentication token/credentials have to be made available in the CI service via environment variables.
|
|
46
46
|
|
|
47
|
-
See [CI configuration recipes](../recipes/ci-configurations
|
|
47
|
+
See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details on how to configure environment variables in your CI service.
|
|
48
48
|
|
|
49
49
|
**Note**: The environment variables `GH_TOKEN`, `GITHUB_TOKEN`, `GL_TOKEN` and `GITLAB_TOKEN` can be used for both the Git authentication and the API authentication required by [@semantic-release/github](https://github.com/semantic-release/github) and [@semantic-release/gitlab](https://github.com/semantic-release/gitlab).
|
package/index.js
CHANGED
|
@@ -75,7 +75,7 @@ async function run(context, plugins) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
logger[options.dryRun ? 'warn' : 'success'](
|
|
78
|
-
`Run automated release from branch ${ciBranch} on repository ${options.
|
|
78
|
+
`Run automated release from branch ${ciBranch} on repository ${options.originalRepositoryURL}${
|
|
79
79
|
options.dryRun ? ' in dry-run mode' : ''
|
|
80
80
|
}`
|
|
81
81
|
);
|
|
@@ -263,6 +263,7 @@ module.exports = async (cliOptions = {}, {cwd = process.cwd(), env = process.env
|
|
|
263
263
|
context.logger.log(`Running ${pkg.name} version ${pkg.version}`);
|
|
264
264
|
try {
|
|
265
265
|
const {plugins, options} = await getConfig(context, cliOptions);
|
|
266
|
+
options.originalRepositoryURL = options.repositoryUrl;
|
|
266
267
|
context.options = options;
|
|
267
268
|
try {
|
|
268
269
|
const result = await run(context, plugins);
|
package/lib/branches/index.js
CHANGED
|
@@ -27,6 +27,7 @@ module.exports = async (repositoryUrl, ciBranch, context) => {
|
|
|
27
27
|
|
|
28
28
|
const errors = [];
|
|
29
29
|
const branchesByType = Object.entries(DEFINITIONS).reduce(
|
|
30
|
+
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
|
|
30
31
|
(branchesByType, [type, {filter}]) => ({[type]: branches.filter(filter), ...branchesByType}),
|
|
31
32
|
{}
|
|
32
33
|
);
|
|
@@ -16,6 +16,7 @@ const prerelease = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const release = {
|
|
19
|
+
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
|
|
19
20
|
filter: (branch) => !maintenance.filter(branch) && !prerelease.filter(branch),
|
|
20
21
|
branchesValidator: (branches) => branches.length <= 3 && branches.length > 0,
|
|
21
22
|
};
|
package/lib/get-git-auth-url.js
CHANGED
|
@@ -89,7 +89,7 @@ module.exports = async (context) => {
|
|
|
89
89
|
try {
|
|
90
90
|
debug('Verifying ssh auth by attempting to push to %s', repositoryUrl);
|
|
91
91
|
await verifyAuth(repositoryUrl, branch.name, {cwd, env});
|
|
92
|
-
} catch
|
|
92
|
+
} catch {
|
|
93
93
|
debug('SSH key auth failed, falling back to https.');
|
|
94
94
|
const envVars = Object.keys(GIT_TOKENS).filter((envVar) => !isNil(env[envVar]));
|
|
95
95
|
|
package/lib/git.js
CHANGED
|
@@ -116,7 +116,7 @@ async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
|
|
|
116
116
|
],
|
|
117
117
|
execaOptions
|
|
118
118
|
);
|
|
119
|
-
} catch
|
|
119
|
+
} catch {
|
|
120
120
|
await execa(
|
|
121
121
|
'git',
|
|
122
122
|
[
|
|
@@ -144,7 +144,7 @@ async function fetchNotes(repositoryUrl, execaOptions) {
|
|
|
144
144
|
['fetch', '--unshallow', repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`],
|
|
145
145
|
execaOptions
|
|
146
146
|
);
|
|
147
|
-
} catch
|
|
147
|
+
} catch {
|
|
148
148
|
await execa('git', ['fetch', repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`], {
|
|
149
149
|
...execaOptions,
|
|
150
150
|
reject: false,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release",
|
|
3
3
|
"description": "Automated semver compliant package publishing",
|
|
4
|
-
"version": "19.0.
|
|
4
|
+
"version": "19.0.3",
|
|
5
5
|
"author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
|
|
6
6
|
"ava": {
|
|
7
7
|
"files": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"sinon": "12.0.1",
|
|
68
68
|
"stream-buffers": "3.0.2",
|
|
69
69
|
"tempy": "1.0.1",
|
|
70
|
-
"xo": "0.
|
|
70
|
+
"xo": "0.32.1"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=16 || ^14.17"
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"prettier": true,
|
|
130
130
|
"space": true,
|
|
131
131
|
"rules": {
|
|
132
|
+
"unicorn/no-reduce": "off",
|
|
132
133
|
"unicorn/string-content": "off"
|
|
133
134
|
}
|
|
134
135
|
},
|