Skip to content

Commit ec545f2

Browse files
committed
fix(projects): fix command sync-npmmirror --syncName
1 parent 0255572 commit ec545f2

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
permissions:
11+
id-token: write
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v2
21+
22+
- name: Set node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: lts/*
26+
cache: pnpm
27+
registry-url: "https://registry.npmjs.org"
28+
29+
- run: npx githublogen
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Install Dependencies
34+
run: pnpm i
35+
36+
- name: PNPM build
37+
run: pnpm run build
38+
39+
- name: Publish to NPM
40+
run: pnpm -r publish --access public --no-git-checks
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43+
NPM_CONFIG_PROVENANCE: true
44+
45+
- name: Sync Npmmirror
46+
run: pnpm soy sync-npmmirror --syncName

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/command/sync-mirror.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import pkg from '../../package.json';
88
* @param pkgName Package name, id has multiple packages, you can use ',' to separate them.
99
* @param showLog Show log. Defaults to true
1010
*/
11-
export async function syncNpmmirror(pkgName?: string, showLog = true) {
12-
if (!pkgName) {
11+
export async function syncNpmmirror(pkgName?: string | boolean, showLog = true) {
12+
if (!pkgName || pkgName === true) {
1313
await syncNpmmirrorAction(pkg.name, showLog);
1414

1515
return;

0 commit comments

Comments
 (0)