-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (35 loc) · 1.1 KB
/
build.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
name: Build
on: pull_request
jobs:
build:
name: Build (${{ matrix.targetPlatform }})
runs-on: ubuntu-latest
strategy:
matrix:
targetPlatform: [chromium, webext, web]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm dependencies
uses: actions/[email protected]
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-production-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-production-
${{ runner.os }}-npm-
- name: Install npm dependencies
run: npm ci --omit=dev --prefer-offline
- name: Run Webpack
run: npx webpack
env:
NODE_ENV: production
APP_VERSION: '2.0.0'
TARGET_PLATFORM: ${{ matrix.targetPlatform }}