Skip to content

Commit 1b331fe

Browse files
ci: add check to verify entrypoint files (#1080)
* ci: add check to verify entrypoint files * fix: set production node env * test: update test coverage --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8f1a47d commit 1b331fe

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/entrypoint.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Entrypoint
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
entrypoint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.x
20+
21+
- name: Install npm deps
22+
run: npm ci
23+
24+
- name: Build project
25+
run: npm run build
26+
env:
27+
NODE_ENV: production
28+
29+
- name: Create npm package
30+
run: npm pack
31+
32+
- name: Verify package entrypoint files
33+
run:
34+
npx npxie eval-and-expect "tar -tf *.tgz"
35+
"package/package.json|package/dist/cjs/index.js|package/dist/mjs/index.js|package/dist/index.browser.min.js|package/dist/types/index.d.ts"
36+
"|"

0 commit comments

Comments
 (0)