diff --git a/.commitlintrc.cjs b/.commitlintrc.cjs index 7a834c0..07ba780 100644 --- a/.commitlintrc.cjs +++ b/.commitlintrc.cjs @@ -28,7 +28,7 @@ module.exports = { subject: '请输入变更描述', breaking: '列举非兼容性重大的变更,如果有多行,使用 "|" 换行(选填项)\n', footer: '列举关联的 issue,例如:#31,#I3244(选填项)\n', - confirmCommit: '是否提交', + confirmCommit: '确定提交', }, types: metas.map((meta) => ({ value: meta.type, diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..acc458f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish NPM + +on: + push: + tags: + - v* + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 7 + + - name: Set node + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: pnpm + + - name: Install + run: pnpm i + + - name: Build + run: pnpm build -a + + - name: Publish + run: pnpm publish:ci + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 730dddc..feca74e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release Package +name: Release Github on: push: @@ -6,7 +6,7 @@ on: - v* jobs: - install: + release: runs-on: ubuntu-latest steps: @@ -26,17 +26,6 @@ jobs: - name: Install run: pnpm i - - name: Test - run: pnpm test - - - name: Build - run: pnpm build -a - - - name: Publish - run: pnpm publish:ci - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Check prerelease uses: actions/github-script@v6 id: prerelease diff --git a/scripts/build.ts b/scripts/build.ts index ddc8455..e0486fd 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -8,9 +8,9 @@ const all = Boolean(args.all || args.a); const sourceMap = all || Boolean(args.sourceMap || args.s); const dts = all || Boolean(args.dts || args.d); -build(); +main(); -function build() { +function main() { exec('rimraf dist'); consola.info('Rollup');