Skip to content

Commit

Permalink
fix(projects): fix command sync-npmmirror --syncName
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Dec 9, 2023
1 parent 0255572 commit ec545f2
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
registry-url: "https://registry.npmjs.org"

- run: npx githublogen
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Install Dependencies
run: pnpm i

- name: PNPM build
run: pnpm run build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

- name: Sync Npmmirror
run: pnpm soy sync-npmmirror --syncName
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/command/sync-mirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import pkg from '../../package.json';
* @param pkgName Package name, id has multiple packages, you can use ',' to separate them.
* @param showLog Show log. Defaults to true
*/
export async function syncNpmmirror(pkgName?: string, showLog = true) {
if (!pkgName) {
export async function syncNpmmirror(pkgName?: string | boolean, showLog = true) {
if (!pkgName || pkgName === true) {
await syncNpmmirrorAction(pkg.name, showLog);

return;
Expand Down

0 comments on commit ec545f2

Please sign in to comment.