From 72984a71e3b2ad0fc6490719051b781dbc61f156 Mon Sep 17 00:00:00 2001 From: ajaxzheng <894103554@qq.com> Date: Wed, 8 Jan 2025 15:17:38 +0800 Subject: [PATCH] ci(workflows): add runtime publish git-action --- .github/workflows/auto-all-publish.yml | 17 ++++++++++------- .../dispatch-renderless-theme-publish.yml | 6 +++--- package.json | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-all-publish.yml b/.github/workflows/auto-all-publish.yml index 77992189ce..042c623577 100644 --- a/.github/workflows/auto-all-publish.yml +++ b/.github/workflows/auto-all-publish.yml @@ -36,25 +36,25 @@ jobs: with: node-version: 20.10.0 registry-url: 'https://registry.npmjs.org' - + - name: Get pnpm store directory id: pnpm-cache run: | - echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT - + echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT + - uses: actions/cache@v3 name: Setup pnpm cache with: path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store- + ${{ runner.os }}-pnpm-store- - name: Install dependencies run: pnpm i --no-frozen-lockfile - name: Run Build Components run: pnpm build:ui -t ${{ steps.parseTag.outputs.publishVersion }} - + - name: Run Build Sass Common run: pnpm build:ui saas-common -t ${{ steps.parseTag.outputs.publishVersion }} -d saas @@ -63,13 +63,16 @@ jobs: - name: Run Build Renderless run: pnpm build:renderless - + - name: Run Build ThemeSaas run: pnpm build:themeSaas - + - name: Run Build ThemeMobile run: pnpm build:themeMobile + - name: Run Build Runtime + run: pnpm build:runtime + - name: Publish Vue3 And Vue2 components run: pnpm pub:all env: diff --git a/.github/workflows/dispatch-renderless-theme-publish.yml b/.github/workflows/dispatch-renderless-theme-publish.yml index 3c69148ac6..7d319dc49f 100644 --- a/.github/workflows/dispatch-renderless-theme-publish.yml +++ b/.github/workflows/dispatch-renderless-theme-publish.yml @@ -1,5 +1,5 @@ -name: Dispatch Renderless Theme -run-name: Dispatch Renderless Theme--${{ inputs.components }} +name: Dispatch Renderless Theme Runtime +run-name: Dispatch Renderless Theme Runtime--${{ inputs.components }} on: workflow_dispatch: @@ -26,7 +26,7 @@ jobs: const branchName = `${{ github.ref_name }}` const moduleName = `${{ inputs.components }}` - if (!moduleName.includes('theme') && !moduleName.includes('renderless')) { + if (!moduleName.includes('theme') && !moduleName.includes('renderless') && !moduleName.includes('runtime')) { throw new Error('请输入正确的包名称') } diff --git a/package.json b/package.json index ad3eaa0959..a6a442b246 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "pub:themeSaas": "pnpm --filter=\"./packages/theme-saas/dist\" publish --no-git-checks --access=public", "pub:renderless": "pnpm --filter=\"./packages/renderless/dist\" publish --no-git-checks --access=public", "pub:runtime": "pnpm --filter=\"./packages/vue-runtime/\" publish --no-git-checks --access=public", - "pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeMobile && pnpm pub:themeSaas && pnpm pub:renderless", + "pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeMobile && pnpm pub:themeSaas && pnpm pub:renderless && pub:runtime", "pub:site": "pnpm -C examples/sites pub", "// ---------- 自动化发测试包 ----------": "", "auto-build-pub": "pnpm -C internals/automate auto-build-pub",