Skip to content

Commit 603ffe9

Browse files
authored
fix: add workflows for PR code check and PR naming linter (#19)
1 parent 8b1dd7d commit 603ffe9

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR Code Checker
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
lint_and_check_build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check Out Repo
12+
uses: actions/checkout@v4
13+
14+
- name: Setup nodejs
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
cache: 'yarn'
19+
20+
- name: Install yarn
21+
run: npm install -g yarn
22+
23+
- name: Install dependencies
24+
run: yarn
25+
26+
- name: Run linter
27+
run: yarn lint
28+
29+
- name: Run builder
30+
run: yarn build

.github/workflows/pr-linter.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Lint PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
branches: [ master ]
10+
11+
jobs:
12+
main:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.VL_BOT_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
persist-credentials: false
1717

1818
- name: Use Node.js
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: '20'
2222
cache: 'yarn'

0 commit comments

Comments
 (0)