Skip to content

Commit 8819e3b

Browse files
committed
chore: Simplify CI/CD by human
1 parent 0f55236 commit 8819e3b

12 files changed

Lines changed: 11236 additions & 443 deletions

File tree

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Quality Assurance & Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore: ['example/**', 'docs/**', '.github/**']
7+
pull_request:
8+
branches: [main]
9+
paths-ignore: ['example/**', 'docs/**', '.github/**']
10+
11+
jobs:
12+
quality:
13+
name: Quality Checks
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: ./lib
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
cache-dependency-path: './lib/package-lock.json'
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Run tests
36+
run: npm test
37+
38+
- name: Run linting
39+
run: npx biome check .
40+
41+
- name: Build package
42+
run: npm run build
43+
44+
release:
45+
name: Release
46+
runs-on: ubuntu-latest
47+
needs: quality
48+
if: github.ref == 'refs/heads/main'
49+
defaults:
50+
run:
51+
working-directory: ./lib
52+
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- name: Setup Node.js
61+
uses: actions/setup-node@v4
62+
with:
63+
node-version: '20'
64+
registry-url: 'https://registry.npmjs.org'
65+
cache: 'npm'
66+
cache-dependency-path: './lib/package-lock.json'
67+
68+
- name: Install dependencies
69+
run: npm ci
70+
71+
- name: Build package
72+
run: npm run build
73+
74+
- name: Release
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
78+
run: npm run release

.github/workflows/quality.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

docs/CI-CD-SETUP.md

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)