|
3 | 3 | push: |
4 | 4 | branches: |
5 | 5 | - '**' |
| 6 | + tags: |
| 7 | + - '!**' |
6 | 8 | pull_request: |
7 | 9 | branches: |
8 | 10 | - main |
9 | 11 | - minor |
10 | 12 |
|
11 | | -permissions: |
12 | | - contents: read # to fetch code (actions/checkout) |
13 | | - |
14 | 13 | jobs: |
15 | | - unit-test: |
16 | | - runs-on: ubuntu-latest |
17 | | - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
18 | | - env: |
19 | | - PUPPETEER_SKIP_DOWNLOAD: 'true' |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4 |
22 | | - |
23 | | - - name: Install pnpm |
24 | | - |
25 | | - |
26 | | - - name: Install Node.js |
27 | | - uses: actions/setup-node@v4 |
28 | | - with: |
29 | | - node-version-file: '.node-version' |
30 | | - cache: 'pnpm' |
31 | | - |
32 | | - - run: pnpm install |
33 | | - |
34 | | - - name: Run unit tests |
35 | | - run: pnpm run test-unit |
36 | | - |
37 | | - unit-test-windows: |
38 | | - runs-on: windows-latest |
39 | | - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
40 | | - env: |
41 | | - PUPPETEER_SKIP_DOWNLOAD: 'true' |
42 | | - steps: |
43 | | - - uses: actions/checkout@v4 |
44 | | - |
45 | | - - name: Install pnpm |
46 | | - |
47 | | - |
48 | | - - name: Install Node.js |
49 | | - uses: actions/setup-node@v4 |
50 | | - with: |
51 | | - node-version-file: '.node-version' |
52 | | - cache: 'pnpm' |
53 | | - |
54 | | - - run: pnpm install |
| 14 | + test: |
| 15 | + if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }} |
| 16 | + uses: ./.github/workflows/test.yml |
55 | 17 |
|
56 | | - - name: Run compiler unit tests |
57 | | - run: pnpm run test-unit compiler |
58 | | - |
59 | | - - name: Run ssr unit tests |
60 | | - run: pnpm run test-unit server-renderer |
61 | | - |
62 | | - e2e-test: |
63 | | - runs-on: ubuntu-latest |
64 | | - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
65 | | - steps: |
66 | | - - uses: actions/checkout@v4 |
67 | | - |
68 | | - - name: Setup cache for Chromium binary |
69 | | - uses: actions/cache@v4 |
70 | | - with: |
71 | | - path: ~/.cache/puppeteer |
72 | | - key: chromium-${{ hashFiles('pnpm-lock.yaml') }} |
73 | | - |
74 | | - - name: Install pnpm |
75 | | - |
76 | | - |
77 | | - - name: Install Node.js |
78 | | - uses: actions/setup-node@v4 |
79 | | - with: |
80 | | - node-version-file: '.node-version' |
81 | | - cache: 'pnpm' |
82 | | - |
83 | | - - run: pnpm install |
84 | | - - run: node node_modules/puppeteer/install.mjs |
85 | | - |
86 | | - - name: Run e2e tests |
87 | | - run: pnpm run test-e2e |
88 | | - |
89 | | - - name: verify treeshaking |
90 | | - run: node scripts/verify-treeshaking.js |
91 | | - |
92 | | - lint-and-test-dts: |
| 18 | + continuous-release: |
93 | 19 | runs-on: ubuntu-latest |
94 | | - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
95 | | - env: |
96 | | - PUPPETEER_SKIP_DOWNLOAD: 'true' |
97 | 20 | steps: |
98 | | - - uses: actions/checkout@v4 |
| 21 | + - name: Checkout |
| 22 | + uses: actions/checkout@v4 |
99 | 23 |
|
100 | 24 | - name: Install pnpm |
101 | | - uses: pnpm/action-setup@v4.0.0 |
| 25 | + uses: pnpm/action-setup@v4 |
102 | 26 |
|
103 | 27 | - name: Install Node.js |
104 | 28 | uses: actions/setup-node@v4 |
105 | 29 | with: |
106 | 30 | node-version-file: '.node-version' |
| 31 | + registry-url: 'https://registry.npmjs.org' |
107 | 32 | cache: 'pnpm' |
108 | 33 |
|
109 | | - - run: pnpm install |
110 | | - |
111 | | - - name: Run eslint |
112 | | - run: pnpm run lint |
113 | | - |
114 | | - - name: Run prettier |
115 | | - run: pnpm run format-check |
116 | | - |
117 | | - - name: Run type declaration tests |
118 | | - run: pnpm run test-dts |
119 | | - |
120 | | - # benchmarks: |
121 | | - # runs-on: ubuntu-latest |
122 | | - # if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
123 | | - # env: |
124 | | - # PUPPETEER_SKIP_DOWNLOAD: 'true' |
125 | | - # steps: |
126 | | - # - uses: actions/checkout@v4 |
127 | | - |
128 | | - # - name: Install pnpm |
129 | | - |
130 | | - |
131 | | - # - name: Install Node.js |
132 | | - # uses: actions/setup-node@v4 |
133 | | - # with: |
134 | | - # node-version-file: '.node-version' |
135 | | - # cache: 'pnpm' |
| 34 | + - name: Install deps |
| 35 | + run: pnpm install |
136 | 36 |
|
137 | | - # - run: pnpm install |
| 37 | + - name: Build |
| 38 | + run: pnpm build --withTypes |
138 | 39 |
|
139 | | - # - name: Run benchmarks |
140 | | - # uses: CodSpeedHQ/action@v2 |
141 | | - # with: |
142 | | - # run: pnpm vitest bench --run |
143 | | - # token: ${{ secrets.CODSPEED_TOKEN }} |
| 40 | + - name: Release |
| 41 | + run: pnpx pkg-pr-new publish --compact --pnpm './packages/*' |
0 commit comments