Skip to content

Commit 332f5c6

Browse files
committed
feat: use new plugins option
- Use new semantic-release `plugins` option - Update documentation - Remove test as the shareable config is purely static BREAKING CHANGE: require semantic-release@15.10.0 or above
1 parent 74d8ddf commit 332f5c6

File tree

8 files changed

+28
-547
lines changed

8 files changed

+28
-547
lines changed

README.md

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,37 @@
11
# @semantic-release/gitlab-config
22

3-
[Semantic-release](https://github.com/semantic-release/semantic-release) shareable config for [GitLab](https://gitlab.com).
3+
[**semantic-release**](https://github.com/semantic-release/semantic-release) shareable config to publish npm packages with [GitLab](https://gitlab.com).
44

55
[![Travis](https://img.shields.io/travis/semantic-release/gitlab-config.svg)](https://travis-ci.org/semantic-release/gitlab-config)
6-
[![Codecov](https://img.shields.io/codecov/c/github/semantic-release/gitlab-config.svg)](https://codecov.io/gh/semantic-release/gitlab-config)
76
[![Greenkeeper badge](https://badges.greenkeeper.io/semantic-release/gitlab-config.svg)](https://greenkeeper.io/)
87

98
[![npm latest version](https://img.shields.io/npm/v/@semantic-release/gitlab-config/latest.svg)](https://www.npmjs.com/package/@semantic-release/gitlab-config)
109
[![npm next version](https://img.shields.io/npm/v/@semantic-release/gitlab-config/next.svg)](https://www.npmjs.com/package/@semantic-release/gitlab-config)
1110

12-
## Usage
11+
## Plugins
12+
13+
This shareable configuration use the following plugins:
14+
- [`@semantic-release/commit-analyzer`](https://github.com/semantic-release/commit-analyzer)
15+
- [`@semantic-release/release-notes-generator`](https://github.com/semantic-release/release-notes-generator)
16+
- [`@semantic-release/npm`](https://github.com/semantic-release/npm)
17+
- [`@semantic-release/gitlab`](https://github.com/semantic-release/gitlab)
1318

14-
### Local installation
19+
## Install
1520

1621
```bash
1722
$ npm install --save-dev semantic-release @semantic-release/gitlab-config
1823
```
1924

20-
In `package.json`:
25+
## Usage
26+
27+
The shareable config can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):
2128

2229
```json
2330
{
24-
"release": {
25-
"extends": "@semantic-release/gitlab-config"
26-
}
31+
"extends": "@semantic-release/gitlab-config"
2732
}
2833
```
2934

30-
### Global installation
31-
32-
```bash
33-
$ npm install -g semantic-release @semantic-release/gitlab-config
34-
$ semantic-release -e @semantic-release/gitlab-config
35-
```
36-
3735
## Configuration
3836

39-
### GitLab authentication
40-
41-
The GitLab authentication configuration is **required** and can be set via [environment variables](#environment-variables).
42-
43-
See [GitLab authentication](https://github.com/semantic-release/gitlab#gitlab-authentication).
44-
45-
### Npm registry authentication
46-
47-
The npm authentication configuration is **required** and can be set via [environment variables](#environment-variables).
48-
49-
See [Npm registry authentication](https://github.com/semantic-release/npm#npm-registry-authentication)
50-
51-
### Environment variables
52-
53-
| Variable | Description |
54-
|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
55-
| `GL_TOKEN` or `GITLAB_TOKEN` | **Required.** The token used to authenticate with GitLab repository. |
56-
| `NPM_TOKEN` | **Required.** Npm token created via [npm token create](https://docs.npmjs.com/getting-started/working_with_tokens#how-to-create-new-tokens) |
57-
58-
### Additional options
59-
60-
This shareable config uses the [`@semantic-release/npm`](https://github.com/semantic-release/npm) and [`@semantic-release/gitlab`](https://github.com/semantic-release/gitlab) plugins. See the documentation of each plugins for additional options.
61-
Options can be set in the Semantic-release configuration.
62-
63-
For example to set a custom GitLab URL:
64-
65-
```json
66-
{
67-
"release": {
68-
"extends": "@semantic-release/gitlab-config",
69-
"gitlabUrl": "https://custom.gitlab.com"
70-
}
71-
}
72-
```
37+
See each [plugin](#plugins) documentation for required installation and configuration steps.

index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
2-
verifyConditions: ['@semantic-release/npm', '@semantic-release/gitlab'],
3-
prepare: ['@semantic-release/npm'],
4-
publish: ['@semantic-release/npm', '@semantic-release/gitlab'],
5-
success: false,
6-
fail: false,
2+
plugins: [
3+
'@semantic-release/commit-analyzer',
4+
'@semantic-release/release-notes-generator',
5+
'@semantic-release/npm',
6+
'@semantic-release/gitlab',
7+
],
78
};

package.json

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@semantic-release/gitlab-config",
3-
"description": "Semantic-release shareable config for GitLab",
3+
"description": "semantic-release shareable config to publish npm packages with GitLab",
44
"version": "0.0.0-development",
55
"author": "Pierre Vanduynslager (https://github.com/pvdlg)",
66
"bugs": {
@@ -16,28 +16,15 @@
1616
"Gregor Martynus (https://twitter.com/gr2m)"
1717
],
1818
"dependencies": {
19-
"@semantic-release/gitlab": "^3.0.0",
20-
"@semantic-release/npm": "^5.0.1"
19+
"@semantic-release/commit-analyzer": "^6.1.0",
20+
"@semantic-release/gitlab": "^3.1.0",
21+
"@semantic-release/npm": "^5.1.1",
22+
"@semantic-release/release-notes-generator": "^7.1.4"
2123
},
2224
"devDependencies": {
23-
"ava": "^0.25.0",
24-
"codecov": "^3.0.0",
2525
"commitizen": "^3.0.0",
2626
"cz-conventional-changelog": "^2.0.0",
27-
"delay": "^4.0.0",
28-
"dockerode": "^2.5.3",
29-
"execa": "^1.0.0",
30-
"fs-extra": "^7.0.0",
31-
"get-stream": "^4.0.0",
32-
"git-log-parser": "^1.2.0",
33-
"got": "^9.0.0",
34-
"mockserver-client": "^5.3.0",
35-
"nyc": "^12.0.1",
36-
"p-retry": "^2.0.0",
37-
"semantic-release": "^15.8.0",
38-
"sinon": "^6.0.0",
39-
"strip-ansi": "^5.0.0",
40-
"tempy": "^0.2.1",
27+
"semantic-release": "^15.10.0",
4128
"xo": "^0.23.0"
4229
},
4330
"engines": {
@@ -57,19 +44,8 @@
5744
],
5845
"license": "MIT",
5946
"main": "index.js",
60-
"nyc": {
61-
"include": [
62-
"index.js"
63-
],
64-
"reporter": [
65-
"json",
66-
"text",
67-
"html"
68-
],
69-
"all": true
70-
},
7147
"peerDependencies": {
72-
"semantic-release": ">=15.9.0 <16.0.0"
48+
"semantic-release": ">=15.10.0 <16.0.0"
7349
},
7450
"prettier": {
7551
"printWidth": 120,
@@ -85,11 +61,8 @@
8561
},
8662
"scripts": {
8763
"cm": "git-cz",
88-
"codecov": "codecov -f coverage/coverage-final.json",
89-
"lint": "xo",
90-
"pretest": "npm run lint",
9164
"semantic-release": "semantic-release",
92-
"test": "nyc ava -v"
65+
"test": "xo"
9366
},
9467
"xo": {
9568
"prettier": true,

test/helpers/git-utils.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

test/helpers/gitbox.js

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)