Skip to content

eclass/template-semantic-release-plugin

Repository files navigation

@eclass/semantic-release-custom-plugin

npm build downloads dependencies devDependency Status Coverage Status Maintainability semantic-release

semantic-release plugin to deploy app

Step Description
verifyConditions Verify the presence of the CUSTOM_ENV environment variable.
publish Deploy app.

Install

npm i -D @eclass/semantic-release-custom-plugin

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    "@eclass/semantic-release-custom-plugin"
  ]
}

Configuration

Environment variables

Variable Description
CUSTOM_ENV A custom env var

Examples

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    "@eclass/semantic-release-custom-plugin"
  ]
}
# .gitlab-ci.yml
release:
  image: node:alpine
  stage: release
  script:
    - npx semantic-release
  only:
    - master
# .travis.yml
language: node_js
cache:
  directories:
    - ~/.npm
node_js:
  - "12"
stages:
  - test
  - name: deploy
    if: branch = master
jobs:
  include:
    - stage: test
      script: npm t
    - stage: deploy
      script: npx semantic-release

License

MIT