-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (47 loc) · 2.07 KB
/
CI.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
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on:
pull_request:
branches: [develop, main, release/**]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check_pr_commits:
name: Check commit messages
runs-on: ubuntu-20.04
steps:
- name: GS Commit Message Checker
# You may pin to the exact commit or the version.
# uses: GsActions/commit-message-checker@9d8708beab99f811c5fe3a4f98acc4b2f2ba8496
uses: GsActions/commit-message-checker@v1
with:
# A regex pattern to check if a commit message is valid.
pattern: "((feat|fix|docs|style|refactor|test|build|ci|perf)+(\\([a-z]+(.)+\\))?\\: [a-z]+(.)+)|(Review fixes(.)*)|(Merge pull request(.)*)"
# Expression flags change how the expression is interpreted.
flags: # optional, default is gm
# A error message which will be returned in case of an error.
error: 'One of commit messages has an incorrect title. Please read the documentation: docs/dev/pr.md'
# Setting this input to true will exclude the Pull Request title from the check.
excludeTitle: true # optional, default is false
# Setting this input to true will exclude the Pull Request description from the check.
excludeDescription: true # optional, default is false
# Setting this input to true will check all Pull Request commits
checkAllCommitMessages: true # optional, default is false
# you must provide GITHUB_TOKEN to this input if checkAllCommitMessages is true
accessToken: ${{ secrets.GITHUB_TOKEN }} # optional, default is false
install-n-lint:
name: Install & Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Prod build
run: npm run build