|
| 1 | +# @eclass/semantic-release-custom-plugin |
| 2 | + |
| 3 | +[](https://www.npmjs.com/package/@eclass/semantic-release-custom-plugin) |
| 4 | +[](https://travis-ci.org/eclass/semantic-release-custom-plugin) |
| 5 | +[](https://www.npmjs.com/package/@eclass/semantic-release-custom-plugin) |
| 6 | +[](https://david-dm.org/eclass/semantic-release-custom-plugin) |
| 7 | +[](https://david-dm.org/eclass/semantic-release-custom-plugin#info=devDependencies) |
| 8 | +[](https://coveralls.io/github/eclass/semantic-release-custom-plugin?branch=master) |
| 9 | +[](https://codeclimate.com/github/eclass/semantic-release-custom-plugin/maintainability) |
| 10 | +[](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