Skip to content

Commit d389797

Browse files
committed
feat(cicd): build workflows for main library and example
1 parent 2cd9a15 commit d389797

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Example (OpenNextJS)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "examples/opennextjs/**"
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- "examples/opennextjs/**"
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: examples/opennextjs
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: "20"
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 10.10.0
33+
run_install: false
34+
35+
- name: Get pnpm store directory
36+
shell: bash
37+
run: |
38+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
39+
40+
- name: Setup pnpm cache
41+
uses: actions/cache@v4
42+
with:
43+
path: ${{ env.STORE_PATH }}
44+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-pnpm-store-
47+
48+
- name: Install dependencies
49+
run: pnpm install
50+
51+
- name: Build Example (OpenNextJS)
52+
run: pnpm build:cf

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build `better-auth-cloudflare` library
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "20"
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10.10.0
26+
run_install: false
27+
28+
- name: Get pnpm store directory
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32+
33+
- name: Setup pnpm cache
34+
uses: actions/cache@v4
35+
with:
36+
path: ${{ env.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
41+
- name: Install dependencies
42+
run: pnpm install
43+
44+
- name: Build
45+
run: pnpm build
46+
47+
- name: Typecheck
48+
run: pnpm typecheck

0 commit comments

Comments
 (0)