@semantic-release/github
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -26,4 +26,14 @@ const {basename} = require('path'); | ||
debug('Create git tag %o with commit %o', ref, gitHead); | ||
await github.gitdata.createReference({owner, repo, ref, sha: gitHead}); | ||
try { | ||
// Test if the tag already exists | ||
await github.gitdata.getReference({owner, repo, ref: `tags/${gitTag}`}); | ||
} catch (err) { | ||
// If the error is 404, the tag doesn't exist, otherwise it's an error | ||
if (err.code !== 404) { | ||
throw err; | ||
} | ||
debug('Create git tag %o with commit %o', ref, gitHead); | ||
await github.gitdata.createReference({owner, repo, ref, sha: gitHead}); | ||
} | ||
const {data: {id, html_url}} = await github.repos.createRelease(release); // eslint-disable-line camelcase | ||
@@ -30,0 +40,0 @@ logger.log('Published Github release: %s', html_url); |
@@ -1,1 +0,1 @@ | ||
{"name":"@semantic-release/github","description":"Set of semantic-release plugins for publishing a Github release","version":"2.0.0","author":"Pierre Vanduynslager (https://twitter.com/@pvdlg_)","bugs":{"url":"https://github.com/semantic-release/github/issues"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"contributors":["Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)","Gregor Martynus (https://twitter.com/gr2m)"],"dependencies":{"@semantic-release/error":"^2.1.0","debug":"^3.1.0","fs-extra":"^4.0.2","github":"^12.0.5","p-each-series":"^1.0.0","parse-github-url":"^1.0.1"},"devDependencies":{"ava":"^0.23.0","clear-module":"^2.1.0","codecov":"^3.0.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint-config-prettier":"^2.8.0","eslint-plugin-prettier":"^2.3.0","nock":"^9.1.0","nyc":"^11.2.1","prettier":"~1.8.2","semantic-release":"^10.0.0","sinon":"^4.0.0","xo":"^0.18.2"},"engines":{"node":">=4"},"files":["lib","index.js"],"homepage":"https://github.com/semantic-release/github#readme","keywords":["git","github","publish","release","semantic-release","version"],"license":"MIT","main":"index.js","nyc":{"include":["lib/**/*.js","index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"singleQuote":true,"bracketSpacing":false,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/semantic-release/github.git"},"scripts":{"cm":"git-cz","codecov":"codecov -f coverage/coverage-final.json","lint":"xo","pretest":"npm run lint","semantic-release":"semantic-release","test":"nyc ava -v"},"xo":{"extends":["prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}}} | ||
{"name":"@semantic-release/github","description":"Set of semantic-release plugins for publishing a Github release","version":"2.1.0","author":"Pierre Vanduynslager (https://twitter.com/@pvdlg_)","bugs":{"url":"https://github.com/semantic-release/github/issues"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"contributors":["Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)","Gregor Martynus (https://twitter.com/gr2m)"],"dependencies":{"@semantic-release/error":"^2.1.0","debug":"^3.1.0","fs-extra":"^4.0.2","github":"^12.0.5","p-each-series":"^1.0.0","parse-github-url":"^1.0.1"},"devDependencies":{"ava":"^0.24.0","clear-module":"^2.1.0","codecov":"^3.0.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint-config-prettier":"^2.8.0","eslint-plugin-prettier":"^2.3.0","nock":"^9.1.0","nyc":"^11.2.1","prettier":"~1.8.2","semantic-release":"^10.0.0","sinon":"^4.0.0","xo":"^0.18.2"},"engines":{"node":">=4"},"files":["lib","index.js"],"homepage":"https://github.com/semantic-release/github#readme","keywords":["git","github","publish","release","semantic-release","version"],"license":"MIT","main":"index.js","nyc":{"include":["lib/**/*.js","index.js"],"reporter":["json","text","html"],"all":true},"prettier":{"printWidth":120,"singleQuote":true,"bracketSpacing":false,"trailingComma":"es5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/semantic-release/github.git"},"scripts":{"cm":"git-cz","codecov":"codecov -f coverage/coverage-final.json","lint":"xo","pretest":"npm run lint","semantic-release":"semantic-release","test":"nyc ava -v"},"xo":{"extends":["prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":2}}} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13668
139