Skip to content

Commit 1ad650d

Browse files
committed
feat: first commit
0 parents  commit 1ad650d

16 files changed

+11614
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-exact=true
2+
access=public

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.13.0

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: node_js
2+
cache:
3+
directories:
4+
- ~/.npm
5+
- .nyc_output
6+
node_js:
7+
- "12.13.0"
8+
notifications:
9+
email: false
10+
stages:
11+
- test
12+
- coverage
13+
- name: deploy
14+
if: branch = master
15+
jobs:
16+
include:
17+
- stage: test
18+
name: eslint
19+
script: npx eslint .
20+
- stage: test
21+
name: commitlint
22+
before_script:
23+
- npm i -g @commitlint/travis-cli
24+
script: commitlint-travis
25+
- stage: test
26+
name: test
27+
script: npm t
28+
- stage: coverage
29+
before_script:
30+
- npm i -g coveralls
31+
script:
32+
- npx nyc check-coverage --lines 85 --per-file
33+
after_success:
34+
- npx nyc report > lcov.info
35+
- coveralls < lcov.info
36+
- stage: deploy
37+
script: npx semantic-release

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# @eclass/semantic-release-custom-plugin
2+
3+
[![npm](https://img.shields.io/npm/v/@eclass/semantic-release-custom-plugin.svg)](https://www.npmjs.com/package/@eclass/semantic-release-custom-plugin)
4+
[![build](https://img.shields.io/travis/eclass/semantic-release-custom-plugin.svg)](https://travis-ci.org/eclass/semantic-release-custom-plugin)
5+
[![downloads](https://img.shields.io/npm/dt/@eclass/semantic-release-custom-plugin.svg)](https://www.npmjs.com/package/@eclass/semantic-release-custom-plugin)
6+
[![dependencies](https://img.shields.io/david/eclass/semantic-release-custom-plugin.svg)](https://david-dm.org/eclass/semantic-release-custom-plugin)
7+
[![devDependency Status](https://img.shields.io/david/dev/eclass/semantic-release-custom-plugin.svg)](https://david-dm.org/eclass/semantic-release-custom-plugin#info=devDependencies)
8+
[![Coverage Status](https://coveralls.io/repos/github/eclass/semantic-release-custom-plugin/badge.svg?branch=master)](https://coveralls.io/github/eclass/semantic-release-custom-plugin?branch=master)
9+
[![Maintainability](https://api.codeclimate.com/v1/badges/f84f0bcb39c9a5c5fb99/maintainability)](https://codeclimate.com/github/eclass/semantic-release-custom-plugin/maintainability)
10+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
11+
12+
> [semantic-release](https://github.com/semantic-release/semantic-release) plugin to deploy app
13+
14+
| Step | Description |
15+
|--------------------|---------------------------------------------------------------------------------------------|
16+
| `verifyConditions` | Verify the presence of the `CUSTOM_ENV` environment variable. |
17+
| `publish` | Deploy app. |
18+
19+
## Install
20+
21+
```bash
22+
npm i -D @eclass/semantic-release-custom-plugin
23+
```
24+
25+
## Usage
26+
27+
The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration):
28+
29+
```json
30+
{
31+
"plugins": [
32+
"@semantic-release/changelog",
33+
"@semantic-release/npm",
34+
"@semantic-release/git",
35+
"@semantic-release/gitlab",
36+
"@eclass/semantic-release-custom-plugin"
37+
]
38+
}
39+
```
40+
41+
## Configuration
42+
43+
### Environment variables
44+
45+
| Variable | Description |
46+
| -------------------- | ----------------------------------------------------------------- |
47+
| `CUSTOM_ENV` | A custom env var |
48+
49+
### Examples
50+
51+
```json
52+
{
53+
"plugins": [
54+
"@semantic-release/changelog",
55+
"@semantic-release/npm",
56+
"@semantic-release/git",
57+
"@semantic-release/gitlab",
58+
"@eclass/semantic-release-custom-plugin"
59+
]
60+
}
61+
```
62+
63+
```yml
64+
# .gitlab-ci.yml
65+
release:
66+
image: node:alpine
67+
stage: release
68+
script:
69+
- npx semantic-release
70+
only:
71+
- master
72+
```
73+
74+
```yml
75+
# .travis.yml
76+
language: node_js
77+
cache:
78+
directories:
79+
- ~/.npm
80+
node_js:
81+
- "12"
82+
stages:
83+
- test
84+
- name: deploy
85+
if: branch = master
86+
jobs:
87+
include:
88+
- stage: test
89+
script: npm t
90+
- stage: deploy
91+
script: npx semantic-release
92+
93+
```
94+
95+
## License
96+
97+
[MIT](https://tldrlegal.com/license/mit-license)

0 commit comments

Comments
 (0)