File tree Expand file tree Collapse file tree 4 files changed +96
-5
lines changed
Expand file tree Collapse file tree 4 files changed +96
-5
lines changed Original file line number Diff line number Diff line change 1- name : Release Package
1+ name : Release Package (Next.js)
22
33on :
44 push :
@@ -9,7 +9,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
99
1010jobs :
1111 release :
12- name : Release
12+ name : Release Package (Next.js)
1313 runs-on : ubuntu-latest
1414 env :
1515 TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
Original file line number Diff line number Diff line change 1- name : Publish Preview Package
1+ name : Publish Preview Package (Next.js)
22on : [push, pull_request]
33
44jobs :
55 build :
6+ name : Publish Preview Package (Next.js)
67 runs-on : ubuntu-latest
78 env :
89 TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
3536 - name : Build package
3637 run : pnpm build --filter=@simpleanalytics/next
3738
38- - name : Publish package
39- run : pnpx pkg-pr-new publish './packages/analytics'
39+ - name : Publish Next preview package
40+ run : pnpx pkg-pr-new publish './packages/analytics'
Original file line number Diff line number Diff line change 1+ name : Publish Preview Package (React.js)
2+ on : [push, pull_request]
3+
4+ jobs :
5+ build :
6+ name : Publish Preview Package (React.js)
7+ runs-on : ubuntu-latest
8+ env :
9+ TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
10+ TURBO_TEAM : ${{ vars.TURBO_TEAM }}
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Enable Corepack
17+ run : npm i -g corepack@latest && corepack enable
18+
19+ - name : Setup Node.js v22 LTS
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : 22
23+ cache : " pnpm"
24+
25+ - name : Cache Turborepo build setup
26+ uses : actions/cache@v4
27+ with :
28+ path : .turbo
29+ key : ${{ runner.os }}-turbo-${{ github.sha }}
30+ restore-keys : |
31+ ${{ runner.os }}-turbo-
32+
33+ - name : Install dependencies
34+ run : pnpm install
35+
36+ - name : Build package
37+ run : pnpm build --filter=@simpleanalytics/react
38+
39+ - name : Publish React preview package
40+ run : pnpx pkg-pr-new publish './packages/react'
Original file line number Diff line number Diff line change 1+ name : Release Package (React.js)
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ concurrency : ${{ github.workflow }}-${{ github.ref }}
9+
10+ jobs :
11+ release :
12+ name : Release Package (React.js)
13+ runs-on : ubuntu-latest
14+ env :
15+ TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
16+ TURBO_TEAM : ${{ vars.TURBO_TEAM }}
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Enable Corepack
23+ run : npm i -g corepack@latest && corepack enable
24+
25+ - name : Setup Node.js v22 LTS
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : 22
29+ cache : " pnpm"
30+ registry-url : https://registry.npmjs.org
31+
32+ - name : Cache Turborepo build setup
33+ uses : actions/cache@v4
34+ with :
35+ path : .turbo
36+ key : ${{ runner.os }}-turbo-${{ github.sha }}
37+ restore-keys : |
38+ ${{ runner.os }}-turbo-
39+
40+ - name : Install dependencies
41+ run : pnpm install
42+
43+ - name : Build package
44+ run : pnpm build --filter=@simpleanalytics/react
45+
46+ - name : Publish package
47+ shell : bash
48+ run : pnpm publish --filter=@simpleanalytics/react --access public --no-git-checks
49+ env :
50+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments