Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit dd234a1

Browse files
committed
💚 fix npm release
1 parent 2844d1c commit dd234a1

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

Diff for: .github/workflows/BuildCI.yml renamed to .github/workflows/ci.yml

+8-11
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ jobs:
1717
- uses: actions/checkout@v2
1818

1919
# nodejs
20-
- uses: actions/setup-node@v2
21-
with:
22-
node-version: '16.x'
23-
registry-url: 'https://npm.pkg.github.com'
2420
- name: Cache pnpm modules
2521
uses: actions/cache@v2
2622
with:
@@ -31,9 +27,7 @@ jobs:
3127
- uses: pnpm/[email protected]
3228
with:
3329
version: 6.14.5
34-
run_install: |
35-
- recursive: true
36-
args: [--frozen-lockfile false]
30+
run_install: true
3731

3832
# rust
3933
- uses: Swatinem/rust-cache@v1
@@ -79,9 +73,12 @@ jobs:
7973
GITHUB_TOKEN: ${{ secrets.github_token }}
8074

8175
# release
82-
- name: Release rust_bakcend
76+
- name: Release npm pkg
77+
uses: actions/setup-node@v2
78+
with:
79+
node-version: '16.x'
80+
registry-url: 'https://registry.npmjs.org'
81+
- run: pnpm ci:publish
8382
env:
8483
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
86-
run: |
87-
pnpm ci:publish
84+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Diff for: .npmrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
workspace-concurrency=Infinity
2+
# Remove when https://github.com/renovatebot/renovate/issues/8323 is fixed
3+
frozen-lockfile=false
4+
stream=true
5+
prefer-workspace-packages=true

Diff for: pnpm-workspace.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
prefer-workspace-packages: true
21
packages:
3-
# all packages in subdirs of packages/ and components/
4-
- 'packages/**'
5-
2+
# all packages in subdirs of packages/ and components/
3+
- 'packages/**'

Diff for: scripts/publish.js

+15-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,26 @@ import { cd } from 'zx'
33

44
// publish rust-backend
55
cd('packages/rust-backend')
6-
await $`pnpm publish-platform`
7-
cd('../../')
6+
try {
7+
await $`pnpm publish-platform`
8+
} catch (error) {
9+
console.error(error)
10+
} finally {
11+
cd('../../')
12+
}
813

914
// publish rubickbase
1015
if (process.platform === 'linux') {
1116
// build
1217
await $`pnpm build`
1318

1419
cd('packages/rubickbase')
15-
await $`pnpx ncu -u`
16-
await $`pnpm publish --access public --no-git-checks`
17-
cd('../../')
20+
try {
21+
await $`pnpx ncu -u`
22+
await $`pnpm publish --access public --no-git-checks`
23+
} catch (error) {
24+
console.error(error)
25+
} finally {
26+
cd('../../')
27+
}
1828
}

0 commit comments

Comments
 (0)