Skip to content

Commit 9bb31e8

Browse files
committed
feat: first release
BREAKING CHANGE: Publish first release
0 parents  commit 9bb31e8

File tree

16 files changed

+11443
-0
lines changed

16 files changed

+11443
-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

.travis.yml

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

CHANGELOG.md

Whitespace-only changes.

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: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# @eclass/semantic-release-netlify
2+
3+
[![npm](https://img.shields.io/npm/v/@eclass/semantic-release-netlify.svg)](https://www.npmjs.com/package/@eclass/semantic-release-netlify)
4+
[![build](https://img.shields.io/travis/eclass/semantic-release-netlify.svg)](https://travis-ci.org/eclass/semantic-release-netlify)
5+
[![downloads](https://img.shields.io/npm/dt/@eclass/semantic-release-netlify.svg)](https://www.npmjs.com/package/@eclass/semantic-release-netlify)
6+
[![dependencies](https://img.shields.io/david/eclass/semantic-release-netlify.svg)](https://david-dm.org/eclass/semantic-release-netlify)
7+
[![devDependency Status](https://img.shields.io/david/dev/eclass/semantic-release-netlify.svg)](https://david-dm.org/eclass/semantic-release-netlify#info=devDependencies)
8+
[![Coverage Status](https://coveralls.io/repos/github/eclass/semantic-release-netlify/badge.svg?branch=master)](https://coveralls.io/github/eclass/semantic-release-netlify?branch=master)
9+
[![Maintainability](https://api.codeclimate.com/v1/badges/f84f0bcb39c9a5c5fb99/maintainability)](https://codeclimate.com/github/eclass/semantic-release-netlify/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 with [netlify](https://netlify.com)
13+
14+
| Step | Description |
15+
|--------------------|---------------------------------------------------------------------------------------------|
16+
| `verifyConditions` | Verify the presence of the `NETLIFY_AUTH_TOKEN` and `NETLIFY_SITE_ID` environment variable. |
17+
| `publish` | Upload assets to netlify. |
18+
19+
## Install
20+
21+
```bash
22+
npm i -D @eclass/semantic-release-netlify
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-netlify"
37+
]
38+
}
39+
```
40+
41+
## Configuration
42+
43+
### Netlify authentication
44+
45+
The netlify authentication configuration is **required** and can be set via [environment variables](#environment-variables).
46+
47+
### Environment variables
48+
49+
| Variable | Description |
50+
| -------------------- | ----------------------------------------------------------------- |
51+
| `NETLIFY_AUTH_TOKEN` | Netlify token created via [personal access tokens](https://app.netlify.com/account/applications/personal) |
52+
| `NETLIFY_SITE_ID` | Netlify site ID created via [netlify sites:create](https://www.netlify.com/docs/cli/#getting-help) |
53+
54+
### Examples
55+
56+
```json
57+
{
58+
"plugins": [
59+
"@semantic-release/changelog",
60+
"@semantic-release/npm",
61+
"@semantic-release/git",
62+
"@semantic-release/gitlab",
63+
"@eclass/semantic-release-netlify"
64+
]
65+
}
66+
```
67+
68+
```yml
69+
# .gitlab-ci.yml
70+
release:
71+
image: node:11-alpine
72+
stage: release
73+
before_script:
74+
- npm i -g netlify-cli
75+
script:
76+
- npx semantic-release
77+
only:
78+
- master
79+
```
80+
81+
```yml
82+
# .travis.yml
83+
language: node_js
84+
cache:
85+
directories:
86+
- ~/.npm
87+
node_js:
88+
- "11"
89+
stages:
90+
- test
91+
- name: deploy
92+
if: branch = master
93+
jobs:
94+
include:
95+
- stage: test
96+
script: npm t
97+
- stage: deploy
98+
before_script:
99+
- npm i -g netlify-cli
100+
script: npx semantic-release
101+
102+
```
103+
104+
## License
105+
106+
[MIT](https://tldrlegal.com/license/mit-license)

0 commit comments

Comments
 (0)