Skip to content

Commit f8ad683

Browse files
authored
Create webpack.yml
1 parent 487bad8 commit f8ad683

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/webpack.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: NodeJS with Webpack
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [14.x, 16.x, 18.x]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- name: Cache
24+
uses: actions/[email protected]
25+
id: node_modules-cache
26+
with:
27+
path: node_modules
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
30+
- name: Install dependencies
31+
if: steps.node_modules-cache.outputs.cache-hit != 'true'
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build

0 commit comments

Comments
 (0)