@eclass/semantic-release-sentry-releases
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.
npm i -D @eclass/semantic-release-sentry-releases
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"
]
}
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
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
{
"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/"
}
]
]
}
{
"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
MIT