Skip to content

Commit 58373ab

Browse files
authoredApr 24, 2024··
refactor: restructure monorepo (#104)
Switch to pnpm workspaces, rename "example app" to "playground", update license to BSD-3-Clause.
1 parent 3935e9f commit 58373ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+18804
-29360
lines changed
 

‎.github/workflows/cicd.yml

+19-11
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ name: CI/CD
22

33
on:
44
push:
5+
paths:
6+
- "packages/**"
57
branches:
68
- main
7-
- alpha
8-
- beta
99
- next
1010
- 4.x
1111
pull_request:
12+
paths:
13+
- "packages/**"
1214
branches:
1315
- "*"
1416

@@ -19,31 +21,37 @@ jobs:
1921
- uses: actions/checkout@v4
2022
with:
2123
fetch-depth: 2
24+
- uses: pnpm/action-setup@v3
25+
with:
26+
version: 9
2227
- name: Setup Node.js
2328
uses: actions/setup-node@v4
2429
with:
2530
node-version: "20"
26-
cache: "npm"
27-
- run: npm ci
28-
- run: npm run lint -- --filter=next-safe-action
31+
cache: "pnpm"
32+
- run: pnpm install --frozen-lockfile
33+
- run: pnpm run lint:lib
2934

3035
CD:
31-
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/next'|| github.ref == 'refs/heads/4.x' }}
36+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'|| github.ref == 'refs/heads/4.x' }}
3237
runs-on: ubuntu-latest
3338
needs: [CI]
3439
steps:
3540
- uses: actions/checkout@v4
3641
with:
3742
fetch-depth: 2
43+
- uses: pnpm/action-setup@v3
44+
with:
45+
version: 9
3846
- name: Setup Node.js
3947
uses: actions/setup-node@v4
4048
with:
4149
node-version: "20"
42-
cache: "npm"
43-
- run: npm ci
44-
- run: npm run build -- --filter=next-safe-action
45-
- name: Release
50+
cache: "pnpm"
51+
- run: pnpm install --frozen-lockfile
52+
- run: pnpm run build:lib
53+
- name: Release lib to NPM
4654
env:
4755
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4856
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
run: npm run deploy -- --filter=next-safe-action
57+
run: pnpm run deploy:lib

‎.husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx commitlint --edit "${1}"
4+
pnpm exec commitlint --edit "${1}"

0 commit comments

Comments
 (0)
Please sign in to comment.