@ethima/semantic-release-configuration 3.0.0 → 3.1.0
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 +17 -3
- package/package.json +2 -1
- package/src/index.js +3 -1
package/README.md
CHANGED
|
@@ -7,7 +7,10 @@ configuration supporting a range of languages and platforms supported by the
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- Analyzes commits using
|
|
10
|
-
[`@semantic-release/commit-analyzer`][semantic-release-commit-analyzer-plugin-url]
|
|
10
|
+
[`@semantic-release/commit-analyzer`][semantic-release-commit-analyzer-plugin-url]
|
|
11
|
+
and the [`conventional-changelog-conventionalcommits`
|
|
12
|
+
preset][conventionalcommits-preset-url] implementing the [Conventional
|
|
13
|
+
Commits specification][conventionalcommits-url].
|
|
11
14
|
- Generates release notes using
|
|
12
15
|
[`@semantic-release/release-notes-generator`][semantic-release-notes-generator-plugin-url].
|
|
13
16
|
- Updates templated content in a project's root-level `README.md` file
|
|
@@ -20,8 +23,10 @@ configuration supporting a range of languages and platforms supported by the
|
|
|
20
23
|
- (Conditionally) maintains NPM package files, i.e. `package.json` and
|
|
21
24
|
publishes using [`@semantic-release/npm`][semantic-release-npm-plugin-url]
|
|
22
25
|
and [`@semantic-release/git`][semantic-release-git-plugin-url].
|
|
23
|
-
- Publishes releases to
|
|
24
|
-
[`@semantic-release/
|
|
26
|
+
- Publishes releases to GitHub using
|
|
27
|
+
[`@semantic-release/github`][semantic-release-github-plugin-url] when
|
|
28
|
+
running from GitHub Actions and to GitLab using
|
|
29
|
+
[`@semantic-release/gitlab`][semantic-release-gitlab-plugin-url] otherwise.
|
|
25
30
|
|
|
26
31
|
## Usage
|
|
27
32
|
|
|
@@ -36,6 +41,12 @@ configuration supporting a range of languages and platforms supported by the
|
|
|
36
41
|
[`extends`][semantic-release-extends-configuration-url] configuration for the
|
|
37
42
|
project to be semantically released.
|
|
38
43
|
|
|
44
|
+
- When using this shareable semantic release configuration from GitHub Actions,
|
|
45
|
+
ensure a `CI_DEFAULT_BRANCH` environment variable is set to the name of the
|
|
46
|
+
branch from which releases should be created. Unfortunately, GitHub does not
|
|
47
|
+
make this information readily available through, for instance, a similarly
|
|
48
|
+
named environment variable.
|
|
49
|
+
|
|
39
50
|
### Configuration
|
|
40
51
|
|
|
41
52
|
The semantic release configuration has several configuration options itself.
|
|
@@ -177,6 +188,8 @@ When this happens, it is typically also necessary to create the initial GitHub
|
|
|
177
188
|
release by hand from the tag and changelog that was created by the
|
|
178
189
|
[`semantic-release`][semantic-release-url] tooling.
|
|
179
190
|
|
|
191
|
+
[conventionalcommits-url]: https://www.conventionalcommits.org
|
|
192
|
+
[conventionalcommits-preset-url]: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits
|
|
180
193
|
[cosmiconfig-url]: https://www.npmjs.com/package/cosmiconfig
|
|
181
194
|
[gitlab-pat-url]: https://gitlab.com/-/profile/personal_access_tokens
|
|
182
195
|
[npm-token-url]: https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-granular-access-tokens-on-the-website
|
|
@@ -185,6 +198,7 @@ release by hand from the tag and changelog that was created by the
|
|
|
185
198
|
[semantic-release-commit-analyzer-plugin-url]: https://github.com/semantic-release/commit-analyzer
|
|
186
199
|
[semantic-release-extends-configuration-url]: https://semantic-release.gitbook.io/semantic-release/usage/configuration#extends
|
|
187
200
|
[semantic-release-git-plugin-url]: https://github.com/semantic-release/git
|
|
201
|
+
[semantic-release-github-plugin-url]: https://github.com/semantic-release/github
|
|
188
202
|
[semantic-release-gitlab-plugin-url]: https://github.com/semantic-release/gitlab
|
|
189
203
|
[semantic-release-notes-generator-plugin-url]: https://github.com/semantic-release/release-notes-generator
|
|
190
204
|
[semantic-release-npm-plugin-configuration-url]: https://github.com/semantic-release/npm#npm-registry-authentication
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethima/semantic-release-configuration",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "A shareable semantic release configuration supporting a range of languages and platforms supported by the Ethima organization.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@google/semantic-release-replace-plugin": "1.2.0",
|
|
22
22
|
"@semantic-release/changelog": "6.0.2",
|
|
23
23
|
"@semantic-release/git": "10.0.1",
|
|
24
|
+
"@semantic-release/github": "8.0.7",
|
|
24
25
|
"@semantic-release/gitlab": "9.5.1",
|
|
25
26
|
"conventional-changelog-conventionalcommits": "5.0.0",
|
|
26
27
|
"cosmiconfig": "8.0.0"
|
package/src/index.js
CHANGED
|
@@ -9,6 +9,8 @@ const GIT_ASSETS = [
|
|
|
9
9
|
...CONFIGURATION.files_with_versioned_templates,
|
|
10
10
|
];
|
|
11
11
|
|
|
12
|
+
const IS_GITHUB = env.GITHUB_ACTIONS === "true";
|
|
13
|
+
|
|
12
14
|
// Ensure the NPM plugin gets added to the semantic release pipeline if a
|
|
13
15
|
// `package.json` file is detected
|
|
14
16
|
const NPM_PLUGIN = [];
|
|
@@ -42,7 +44,7 @@ const SEMANTIC_RELEASE_CONFIGURATION = {
|
|
|
42
44
|
"chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
|
|
43
45
|
},
|
|
44
46
|
],
|
|
45
|
-
"@semantic-release/gitlab",
|
|
47
|
+
IS_GITHUB ? "@semantic-release/github" : "@semantic-release/gitlab",
|
|
46
48
|
],
|
|
47
49
|
};
|
|
48
50
|
|