diff --git a/lib/plugin/npm/npm.js b/lib/plugin/npm/npm.js index ccbd15e3..b6a010f6 100644 --- a/lib/plugin/npm/npm.js +++ b/lib/plugin/npm/npm.js @@ -162,8 +162,13 @@ class npm extends Plugin { } async resolveTag(version) { + const { tag } = this.options; const { isPreRelease, preReleaseId } = parseVersion(version); - return !isPreRelease ? DEFAULT_TAG : preReleaseId || (await this.guessPreReleaseTag()); + if (!isPreRelease) { + return DEFAULT_TAG; + } else { + return tag || preReleaseId || (await this.guessPreReleaseTag()); + } } async publish({ otp = this.options.otp, otpCallback } = {}) {