web/.github/workflows/build.yml

73 lines
1.6 KiB
YAML
Raw Normal View History

2021-02-08 11:10:50 +00:00
name: Test Build
2020-11-06 14:40:23 +00:00
on:
push:
paths:
- "**/*.js"
2021-06-03 05:15:04 +00:00
- "**/*.ts"
2020-11-06 14:40:23 +00:00
- "**/*.vue"
- "public/**/*"
- "package-lock.json"
- "package.json"
pull_request:
branches: [ master ]
types: [ opened, synchronize, reopened ]
paths:
- "**/*.js"
2021-06-03 05:15:04 +00:00
- "**/*.ts"
2020-11-06 14:40:23 +00:00
- "**/*.vue"
- "public/**/*"
- "package-lock.json"
- "package.json"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
build: [ legacy, modern ]
include:
- build: legacy
2021-02-07 17:47:31 +00:00
BUILD_ARGS: ""
BUILD_EXTENSION: true
2020-11-06 14:40:23 +00:00
- build: modern
BUILD_ARGS: "-- --modern"
2021-02-07 17:47:31 +00:00
BUILD_EXTENSION: false
2020-11-06 14:40:23 +00:00
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
2020-11-06 14:40:23 +00:00
with:
node-version: "16"
2020-11-06 14:40:23 +00:00
- name: Install Dependencies
run: npm ci
2020-11-06 14:40:23 +00:00
- name: Test Coverage
uses: ArtiomTr/jest-coverage-report-action@v2.0-rc.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2020-11-06 14:40:23 +00:00
- name: Build
run: npm run build ${{ matrix.BUILD_ARGS }}
2021-02-07 17:47:31 +00:00
2020-11-06 14:40:23 +00:00
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.build }}
path: ./dist
- name: Build Extension
if: ${{ matrix.BUILD_EXTENSION }}
run: npm run make-extension
2021-02-07 17:47:31 +00:00
- name: Publish artifact - Extension
if: ${{ matrix.BUILD_EXTENSION }}
uses: actions/upload-artifact@v2
with:
name: extension
path: ./dist