Skip to content

Commit 709d044

Browse files
committed
Revert publishing as it was in b620512
1 parent b9b47a7 commit 709d044

2 files changed

Lines changed: 12 additions & 21 deletions

File tree

.github/workflows/publish-canary.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,20 @@ jobs:
2222
fetch-depth: 0
2323

2424
- name: Setup Node.js environment
25-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v3
2626
with:
27-
node-version: 20
28-
registry-url: 'https://registry.npmjs.org'
27+
node-version: 18
2928
cache: 'yarn'
3029
cache-dependency-path: 'public-yarn.lock'
3130

32-
- name: Show npm version
33-
run: npm --version
34-
35-
# Optional: Remove if not needed for Yarn flow
36-
- name: Update npm (required for trusted publishing)
37-
run: npm install -g npm@latest
38-
3931
- name: Enable corepack
4032
run: corepack enable
4133

42-
- name: Set Yarn to stable version
43-
run: yarn set version stable
44-
4534
- name: Install dependencies
4635
run: yarn
4736

4837
- name: Publish Canary Packages
4938
run: yarn tsx ./scripts/publish-canary.ts
5039
env:
51-
GH_TOKEN: ${{ github.token }}
40+
GH_TOKEN: ${{ github.token }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

scripts/lib/publishing.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ function topologicalSortPackages(packages: Record<string, PackageDetails>) {
109109
}
110110

111111
export async function publish() {
112-
// const npmToken = process.env.NPM_TOKEN
113-
// if (!npmToken) {
114-
// throw new Error('NPM_TOKEN not set')
115-
// }
116-
//
117-
// execSync(`yarn config set npmAuthToken ${npmToken}`, { stdio: 'inherit' })
118-
// execSync(`yarn config set npmRegistryServer https://registry.npmjs.org`, { stdio: 'inherit' })
112+
const npmToken = process.env.NPM_TOKEN
113+
if (!npmToken) {
114+
throw new Error('NPM_TOKEN not set')
115+
}
116+
117+
execSync(`yarn config set npmAuthToken ${npmToken}`, { stdio: 'inherit' })
118+
execSync(`yarn config set npmRegistryServer https://registry.npmjs.org`, { stdio: 'inherit' })
119119

120120
const packages = getAllPackageDetails()
121121

@@ -216,3 +216,4 @@ function retry(
216216
attempt()
217217
})
218218
}
219+

0 commit comments

Comments
 (0)