Skip to content

Commit

Permalink
feat: npm package root path
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 authored Aug 20, 2023
1 parent 4d26cd0 commit 7048dd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const {
GIT_COMMITTER_EMAIL,
GIT_AUTHOR_NAME,
GIT_AUTHOR_EMAIL,
NPM_PACKAGE_ROOT
} = process.env;
const [owner, repo] = String(GITHUB_REPOSITORY).toLowerCase().split("/");
const addPlugin = (plugin, options) => {
Expand All @@ -56,7 +57,7 @@ try {
authorName && !GIT_AUTHOR_NAME && (process.env.GIT_AUTHOR_NAME = `${authorName}`);
authorEmail && !GIT_AUTHOR_EMAIL && (process.env.GIT_AUTHOR_EMAIL = `${authorEmail}`);
} catch (e) {
log.warn(`Unable to set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL`);
log.warn(`Unable to set GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL`);
log.error(e);
}

Expand Down Expand Up @@ -117,8 +118,10 @@ addPlugin("@semantic-release/changelog", {
> All notable changes to this project will be documented in this file`
});

const pkgRoot = NPM_PACKAGE_ROOT || ".";
addPlugin("@semantic-release/npm", {
"tarballDir": "pack"
tarballDir: "pack",
pkgRoot,
});

const actionExists = existsSync("./action.yml");
Expand Down

0 comments on commit 7048dd6

Please sign in to comment.