Skip to content

Commit 301a4e0

Browse files
authored
ci: add github workflows (#10)
1 parent 2d02e65 commit 301a4e0

2 files changed

Lines changed: 85 additions & 0 deletions

File tree

.github/workflows/source.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: SOURCE
2+
3+
on:
4+
workflow_call:
5+
merge_group:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
name: lint source
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: setup package manager
21+
uses: pnpm/action-setup@v4
22+
with:
23+
run_install: false
24+
- name: install node
25+
uses: actions/setup-node@v4
26+
with:
27+
cache: 'pnpm'
28+
check-latest: true
29+
node-version-file: '.nvmrc'
30+
- name: install dependencies
31+
run: pnpm install
32+
- name: lint source
33+
run: pnpm lint
34+
build:
35+
name: build source
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: checkout repository
39+
uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 0
42+
- name: setup package manager
43+
uses: pnpm/action-setup@v4
44+
with:
45+
run_install: false
46+
- name: install node
47+
uses: actions/setup-node@v4
48+
with:
49+
cache: 'pnpm'
50+
check-latest: true
51+
node-version-file: '.nvmrc'
52+
- name: install dependencies
53+
run: pnpm install
54+
- name: build source
55+
run: pnpm build

.github/workflows/title.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: TITLE
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
types: [opened, reopened, edited, synchronize]
7+
8+
jobs:
9+
lint:
10+
name: lint title
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: setup package manager
18+
uses: pnpm/action-setup@v4
19+
with:
20+
run_install: false
21+
- name: install node
22+
uses: actions/setup-node@v4
23+
with:
24+
cache: 'pnpm'
25+
check-latest: true
26+
node-version-file: '.nvmrc'
27+
- name: install dependencies
28+
run: pnpm install
29+
- name: lint title
30+
run: echo "${{ github.event.pull_request.title }}" | pnpm exec commitlint --extends @somehow-digital/commitlint-config/conventional

0 commit comments

Comments
 (0)