@semantic-release/github
Advanced tools
Comparing version 3.0.3 to 4.0.0
@@ -23,17 +23,2 @@ const {basename, extname} = require('path'); | ||
const ref = `refs/tags/${gitTag}`; | ||
try { | ||
// Test if the tag already exists | ||
await github.gitdata.getReference({owner, repo, ref: `tags/${gitTag}`}); | ||
debug('The git tag %o already exists', 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', gitTag, gitHead); | ||
await github.gitdata.createReference({owner, repo, ref, sha: gitHead}); | ||
} | ||
const {data: {html_url: htmlUrl, upload_url: uploadUrl}} = await github.repos.createRelease(release); | ||
@@ -40,0 +25,0 @@ logger.log('Published GitHub release: %s', htmlUrl); |
@@ -31,6 +31,3 @@ const {isString, isPlainObject, isUndefined, isArray} = require('lodash'); | ||
if (!owner || !repo) { | ||
throw new SemanticReleaseError( | ||
`The git repository URL ${repositoryUrl} is not a valid GitHub URL.`, | ||
'EINVALIDGITURL' | ||
); | ||
throw new SemanticReleaseError(`The git repository URL is not a valid GitHub URL.`, 'EINVALIDGITURL'); | ||
} | ||
@@ -37,0 +34,0 @@ |
{ | ||
"name": "@semantic-release/github", | ||
"description": "Set of semantic-release plugins for publishing a GitHub release", | ||
"version": "3.0.3", | ||
"version": "4.0.0", | ||
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)", | ||
@@ -31,3 +31,3 @@ "bugs": { | ||
"devDependencies": { | ||
"ava": "^0.24.0", | ||
"ava": "^0.25.0", | ||
"clear-module": "^2.1.0", | ||
@@ -34,0 +34,0 @@ "codecov": "^3.0.0", |
@@ -89,3 +89,2 @@ # @semantic-release/github | ||
"verifyConditions": ["@semantic-release/github", "@semantic-release/npm", "verify-other-condition"], | ||
"getLastRelease": "@semantic-release/npm", | ||
"publish": ["@semantic-release/npm", "@semantic-release/github", "other-publish"] | ||
@@ -92,0 +91,0 @@ } |
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
18769
205
123