Add CI workflow

This commit is contained in:
Stéphan Kochen
2020-08-29 10:51:05 +02:00
parent bb89204596
commit 8d911ac7b0
3 changed files with 542 additions and 9 deletions
+38
View File
@@ -0,0 +1,38 @@
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- uses: actions/cache@v2
with:
path: .yarn/cache
key: yarn-${{ hashFiles('yarn.lock') }}
restore-keys: yarn-
- name: Yarn install
run: yarn install --immutable
- name: TypeScript
run: yarn check
- name: Build
run: yarn build
- name: Check dist
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
echo "Build in dist/ is outdated"
exit 1
fi