Skip to content

Commit 94636c7

Browse files
committed
chore: add release automation and commit linting
1 parent 4171abb commit 94636c7

6 files changed

Lines changed: 681 additions & 57 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
lint:
11-
name: Biome Check
11+
name: Lint & Typecheck
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
@@ -18,3 +18,5 @@ jobs:
1818
- run: bun install --frozen-lockfile
1919

2020
- run: bun run lint
21+
22+
- run: bun run typecheck

.github/workflows/commitlint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Commitlint
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
commitlint:
9+
name: Lint Commits
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: wagoid/commitlint-github-action@v6

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version bump"
8+
required: true
9+
default: "patch"
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
release:
18+
name: Release
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
id-token: write
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- uses: oven-sh/setup-bun@v2
30+
31+
- run: bun install --frozen-lockfile
32+
33+
- name: Configure Git
34+
run: |
35+
git config user.name "${GITHUB_ACTOR}"
36+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
37+
38+
- name: Release
39+
working-directory: package
40+
run: bun run release --ci --increment ${{ inputs.version }}
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)