From 7048dd650ff4a3b6e6938cf73f96d3551c4921ca Mon Sep 17 00:00:00 2001 From: Anush Date: Sun, 20 Aug 2023 20:03:00 +0530 Subject: [PATCH 1/5] feat: npm package root path --- release.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release.config.js b/release.config.js index d40c10b..513a6fc 100644 --- a/release.config.js +++ b/release.config.js @@ -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) => { @@ -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); } @@ -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"); From 1d80114da0d612de9181cce64de77d1ebe10e14c Mon Sep 17 00:00:00 2001 From: Anush Date: Sun, 20 Aug 2023 21:03:15 +0530 Subject: [PATCH 2/5] docs: NPM_PACKAGE_ROOT README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 68534c8..5e63b1e 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,8 @@ Keep one of `files` or `main` keys in your `package.json` accurate depending on If you publish, make sure to also provide a valid `NPM_TOKEN` as `.npmrc` authentication is ignored in our config! +To configure the directory for publishing, you have the option to set a path value to `NPM_PACKAGE_ROOT`. By default, it is set to `"."`. + ### GitHub Actions Unless you have an `action.yml` present in your root folder, this module is not added to the release config. From c2109ee68edb5e17a396878f43a3a4ca41c97364 Mon Sep 17 00:00:00 2001 From: Anush Date: Mon, 21 Aug 2023 08:40:30 +0530 Subject: [PATCH 3/5] feat: bump pkg, pkg-lock subdir --- release.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release.config.js b/release.config.js index 513a6fc..34d2d00 100644 --- a/release.config.js +++ b/release.config.js @@ -170,6 +170,8 @@ addPlugin("@semantic-release/git", { "CHANGELOG.md", "package.json", "package-lock.json", + "**/package.json", + "**/package-lock.json", "npm-shrinkwrap.json", "yarn.lock", "pnpm-lock.yaml", From 5ce8e0e2375e538b7016ea460c86da968492008a Mon Sep 17 00:00:00 2001 From: Anush Date: Mon, 21 Aug 2023 10:40:19 +0530 Subject: [PATCH 4/5] feat: commit npm-shrinkwrap.json --- release.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.config.js b/release.config.js index 34d2d00..ae37fa5 100644 --- a/release.config.js +++ b/release.config.js @@ -171,7 +171,7 @@ addPlugin("@semantic-release/git", { "package.json", "package-lock.json", "**/package.json", - "**/package-lock.json", + "**/npm-shrinkwrap.json", "npm-shrinkwrap.json", "yarn.lock", "pnpm-lock.yaml", From 73b8c0d70db730b91a4b7c99ab0ad88ab2bdc9c2 Mon Sep 17 00:00:00 2001 From: Anush Date: Mon, 21 Aug 2023 11:32:53 +0530 Subject: [PATCH 5/5] chore: commit all pkg manager files --- release.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release.config.js b/release.config.js index ae37fa5..765eb5c 100644 --- a/release.config.js +++ b/release.config.js @@ -170,11 +170,14 @@ addPlugin("@semantic-release/git", { "CHANGELOG.md", "package.json", "package-lock.json", - "**/package.json", - "**/npm-shrinkwrap.json", "npm-shrinkwrap.json", "yarn.lock", "pnpm-lock.yaml", + "**/package.json", + "**/package-lock.json", + "**/npm-shrinkwrap.json", + "**/yarn.lock", + "**/pnpm-lock.yaml", "public/**/*", "supabase/**/*", "action.yml",