Skip to content

Commit

Permalink
Merge pull request #31 from nordeck/nic/feat/npm-publish-public
Browse files Browse the repository at this point in the history
Publish as public packages
  • Loading branch information
dhenneke authored Sep 25, 2023
2 parents 0df37c5 + 8a1d6a3 commit 9e5db41
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/publishAllPackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* limitations under the License.
*/

/**
* Publish all non-published packages to the NPM registry.
*
* !!! This script is intended to only be run by the github workflow! !!!
*/

const fs = require('fs');
const path = require('path');
const child_process = require('child_process');
Expand Down Expand Up @@ -45,9 +51,10 @@ for (let p of packages) {

console.log(`🔄 Publish package ${name}@${version}`);

child_process.execSync('npm publish --registry https://registry.npmjs.org', {
cwd: packagePath,
});
child_process.execSync(
'npm publish --registry https://registry.npmjs.org --access public',
{ cwd: packagePath },
);

console.log(`✅ Package ${name} published`);
}
Expand Down

0 comments on commit 9e5db41

Please sign in to comment.