mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
chore: 节约 ci 资源
This commit is contained in:
parent
da5260fd48
commit
0a3bb297f3
25
.github/workflows/pkg.pr.new.yml
vendored
25
.github/workflows/pkg.pr.new.yml
vendored
@ -1,8 +1,14 @@
|
||||
name: Publish Any Commit
|
||||
on: [push, pull_request]
|
||||
name: Continuous Releases
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["✅ test"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -14,9 +20,20 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
# ========== Prepare package ==========
|
||||
- name: restore cache from package-lock.json
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: package-temp-dir
|
||||
key: lock-${{ github.sha }}
|
||||
|
||||
- name: restore cache from node_modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
||||
|
||||
# ========== build ==========
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user