Need private packages and team management tools?Check out npm Teams »

@eclass/semantic-release-sentry-releases

2.3.2 • Public • Published

@eclass/semantic-release-sentry-releases

npm Node.js CI downloads dependencies devDependency Status Coverage Status Maintainability semantic-release

semantic-release plugin to create releases in sentry

Step Description
verifyConditions Verify the presence of the SENTRY_AUTH_TOKEN SENTRY_ORG and SENTRY_PROJECT environment variable.
publish Create release and deploy in sentry project.

Install

npm i -D @eclass/semantic-release-sentry-releases

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-sentry-releases"
  ]
}

Configuration

Environment variables

Variable Description
SENTRY_AUTH_TOKEN Sentry token created in profile
SENTRY_ORG Sentry organization name
SENTRY_PROJECT Sentry project name
DEPLOY_START Sentry deploy start timestamp. Optional for deploy
DEPLOY_END Sentry deploy end timestamp. Optional for deploy

Options

Variable Description
project Sentry project name. Optional. Required if not present in environment variables
org Sentry organization name. Optional. Required if not present in environment variables
repositoryUrl A valid url for add link to commits of new release. Optional. Ex: https://github.com/owner/repo
tagsUrl A valid url for add link to new release. Optional. Ex: https://github.com/owner/repo/releases/tag/vx.y.z
environment Sentry environment. Optional for deploy. Default production
deployName Deploy name. Optional for deploy
deployUrl Deploy url. Optional for deploy
sourcemaps Directory with sourcemaps. Example dist. Optional for upload sourcemaps
urlPrefix URL prefix for sourcemaps. Example ~/dist. Optional for upload sourcemaps
rewrite Boolean to indicate rewrite sourcemaps. Default false. Optional for upload sourcemaps

Examples

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    [
      "@eclass/semantic-release-sentry-releases",
      {
        "repositoryUrl": "https://github.com/owner/repo",
        "tagsUrl": "https://github.com/owner/repo/releases/tag/"
      }
    ]
  ]
}

Upload sourcemaps

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    [
      "@semantic-release/exec",
      {
        "prepareCmd": "npm run build"
      }
    ],
    [
      "@eclass/semantic-release-sentry-releases",
      {
        "repositoryUrl": "https://github.com/owner/repo",
        "tagsUrl": "https://github.com/owner/repo/releases/tag/",
        "sourcemaps": "dist",
        "urlPrefix": "~/dist"
      }
    ]
  ]
}
# .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

Install

npm i @eclass/semantic-release-sentry-releases

DownloadsWeekly Downloads

3,889

Version

2.3.2

License

MIT

Unpacked Size

38 kB

Total Files

19

Last publish

Collaborators

  • avatar
  • avatar
  • avatar