-
Notifications
You must be signed in to change notification settings - Fork 37
44 lines (42 loc) · 1.18 KB
/
check_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: Check build
on:
pull_request:
branches:
- main
jobs:
lint-commits:
name: Lint commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# we actually need "github.event.pull_request.commits + 1" commit
fetch-depth: 0
- uses: actions/setup-node@v4
- run: npm ci --ignore-scripts
- run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
check:
name: Check build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.17.1
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release dry run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release -- --dry-run
- name: Install demo dependencies
working-directory: ./demo
run: npm ci
- name: Build demo
working-directory: ./demo
run: npm run build