Skip to content

Commit 5206d6a

Browse files
committed
Add rules-unit-testing npm token
1 parent 8c5d522 commit 5206d6a

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/test-all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
NPM_TOKEN_POLYFILL: ${{secrets.NPM_TOKEN_POLYFILL}}
7979
NPM_TOKEN_REMOTE_CONFIG: ${{secrets.NPM_TOKEN_REMOTE_CONFIG}}
8080
NPM_TOKEN_REMOTE_CONFIG_TYPES: ${{secrets.NPM_TOKEN_REMOTE_CONFIG_TYPES}}
81+
NPM_TOKEN_RULES_UNIT_TESTING: ${{secrets.NPM_TOKEN_RULES_UNIT_TESTING}}
8182
NPM_TOKEN_STORAGE: ${{secrets.NPM_TOKEN_STORAGE}}
8283
NPM_TOKEN_STORAGE_TYPES: ${{secrets.NPM_TOKEN_STORAGE_TYPES}}
8384
NPM_TOKEN_TESTING: ${{secrets.NPM_TOKEN_TESTING}}

scripts/release/canary.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ async function publishPackage(pkg: string) {
9090
try {
9191
const path = await mapPkgNameToPkgPath(pkg);
9292

93-
const { private: isPrivate } = JSON.parse(
94-
await readFile(`${path}/package.json`, 'utf8')
95-
);
96-
97-
/**
98-
* Skip private packages
99-
*/
100-
if (isPrivate) return;
101-
10293
/**
10394
* publish args
10495
*/
@@ -134,9 +125,20 @@ async function publishToNpm(updatedPkgs: string[]) {
134125
* Can't require here because we have a cached version of the required JSON
135126
* in memory and it doesn't contain the updates
136127
*/
137-
const { version } = JSON.parse(
128+
const { version, private: isPrivate } = JSON.parse(
138129
await readFile(`${path}/package.json`, 'utf8')
139130
);
131+
132+
/**
133+
* Skip private packages
134+
*/
135+
if (isPrivate) {
136+
return {
137+
title: `Skipping private package: ${pkg}.`,
138+
task: () => {}
139+
};
140+
}
141+
140142
return {
141143
title: `📦 ${pkg}@${version}`,
142144
task: () => publishPackage(pkg)

0 commit comments

Comments
 (0)