2022-01-14 05:17:38 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- development
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/build.yml'
|
|
|
|
- 'packages/**/*'
|
|
|
|
- 'scripts/**/*'
|
|
|
|
- 'babel.config.js'
|
|
|
|
- 'package.json'
|
|
|
|
- 'webpack.config.js'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- development
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/build.yml'
|
|
|
|
- 'packages/**/*'
|
|
|
|
- 'scripts/**/*'
|
|
|
|
- 'babel.config.js'
|
|
|
|
- 'package.json'
|
|
|
|
- 'webpack.config.js'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
# we want to run the full build on all os: don't cancel running jobs even if one fails
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: ['ubuntu-20.04', 'macos-11', 'windows-2019']
|
|
|
|
steps:
|
2022-07-05 06:08:25 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-14 05:17:38 +00:00
|
|
|
- name: Setup node
|
2022-07-05 06:08:25 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-14 05:17:38 +00:00
|
|
|
with:
|
2022-07-05 06:08:25 +00:00
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Install dependencies
|
2022-01-14 05:17:38 +00:00
|
|
|
run: npm install
|
2022-07-05 06:08:25 +00:00
|
|
|
- name: Build @maxgraph/core - umd
|
|
|
|
working-directory: packages/core
|
|
|
|
run: npm run build
|
|
|
|
- name: Build @maxgraph/core - esm
|
|
|
|
working-directory: packages/core
|
|
|
|
run: npm run generate-esm
|
|
|
|
- name: Generate @maxgraph/core types
|
|
|
|
working-directory: packages/core
|
2022-04-03 11:09:24 +00:00
|
|
|
run: npm run generate-types
|
2022-07-05 06:08:25 +00:00
|
|
|
- name: Build ts-example
|
|
|
|
working-directory: packages/ts-example
|
|
|
|
run: npm run build
|