-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.14 KB
/
build-es-bundle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build ES Bundle
on:
workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
cache-dependency-path: ./material-web/package-lock.json
- uses: google/wireit@setup-github-actions-caching/v1
- name: Build
run: |
cd ./material-web
npm ci
npm run build
env:
WIREIT_FAILURES: continue
- name: Bundle
run: |
cd ./material-web
npx esbuild --bundle --minify --format=esm --outfile=../dist/bundle.esm.min.js all.js
- name: Archive bundle
uses: actions/upload-artifact@v3
with:
name: ESM Bundle
path: dist/bundle.esm.min.js
- name: Commit bundle
run: |
git config --global user.name "Luke Vo"
git config --global user.email "[email protected]"
git add ./dist/bundle.esm.min.js -f
git commit -m "Added built ESM bundle"
git push origin main