Skip to content

Commit 6a70a24

Browse files
committed
update release CI
1 parent e3b43f8 commit 6a70a24

File tree

15 files changed

+273
-188
lines changed

15 files changed

+273
-188
lines changed

.github/workflows/continuous-release.yml

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,74 @@ name: Publish Any Commit
22
on: [push, pull_request]
33

44
jobs:
5-
build:
5+
lint:
66
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout code
9+
uses: actions/checkout@v4
10+
11+
- run: corepack enable
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 22
15+
cache: "pnpm"
16+
17+
- name: Install dependencies
18+
run: pnpm install --frozen-lockfile
719

20+
- name: Lint
21+
run: pnpm lint
22+
23+
typecheck:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- run: corepack enable
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
cache: "pnpm"
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Type Check
39+
run: pnpm typecheck
40+
41+
test:
42+
runs-on: ubuntu-latest
43+
needs: [lint, typecheck]
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v4
47+
48+
- run: corepack enable
49+
- uses: actions/setup-node@v4
50+
with:
51+
node-version: 22
52+
cache: "pnpm"
53+
54+
- name: Install dependencies
55+
run: pnpm install --frozen-lockfile
56+
57+
- name: Install 1Password CLI
58+
uses: 1password/install-cli-action@v1
59+
60+
- name: Run Unit Tests
61+
run: op run --env-file=op.env -- pnpm test
62+
env:
63+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
64+
65+
- name: Run fmodata E2E Tests
66+
run: op run --env-file=op.env -- pnpm --filter @proofkit/fmodata test:e2e:ci
67+
env:
68+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
69+
70+
build:
71+
runs-on: ubuntu-latest
72+
needs: [test]
873
steps:
974
- name: Checkout code
1075
uses: actions/checkout@v4
@@ -20,4 +85,5 @@ jobs:
2085

2186
- name: Build
2287
run: pnpm build
88+
2389
- run: pnpm dlx pkg-pr-new publish './packages/*' --packageManager=pnpm

.github/workflows/release.yml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,61 @@
11
name: Release
22

33
on:
4+
workflow_dispatch:
5+
46
push:
57
branches:
68
- main
79

810
concurrency: ${{ github.workflow }}-${{ github.ref }}
911

1012
permissions:
11-
# Changesets/action needs to push version commits and open/update a PR
1213
contents: write
1314
pull-requests: write
14-
id-token: write # Required for OIDC
15+
id-token: write
1516

1617
jobs:
18+
quality:
19+
name: Quality Checks
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@v4
24+
25+
- name: Enable Corepack
26+
run: corepack enable
27+
28+
- name: Setup Node.js 22.x
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
cache: "pnpm"
33+
34+
- name: Install Dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Lint
38+
run: pnpm lint
39+
40+
- name: Type Check
41+
run: pnpm typecheck
42+
43+
- name: Install 1Password CLI
44+
uses: 1password/install-cli-action@v1
45+
46+
- name: Run Tests
47+
run: op run --env-file=op.env -- pnpm test
48+
env:
49+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
50+
51+
- name: Run fmodata E2E Tests
52+
run: op run --env-file=op.env -- pnpm --filter @proofkit/fmodata test:e2e:ci
53+
env:
54+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
55+
1756
release:
1857
name: Release
58+
needs: [quality]
1959
runs-on: ubuntu-latest
2060
steps:
2161
- name: Checkout Repo
@@ -38,9 +78,7 @@ jobs:
3878
id: changesets
3979
uses: changesets/action@v1
4080
with:
41-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
4281
publish: pnpm release
4382
env:
4483
GITHUB_TOKEN: ${{ github.token }}
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
4684
NPM_CONFIG_PROVENANCE: true
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,27 @@
55
# | | | | (_| \__ \__ \\ V V / (_) | | | (_| || __/ | | \ V /
66
# |_|_| \__,_|___/___/ \_/\_/ \___/|_| \__,_(_)___|_| |_|\_/
77
#
8-
# This file is intentionally commited to source control.
8+
# This file is intentionally committed to source control.
99
# It should only reference secrets in 1Password
1010

11-
DIFFERENT_FM_SERVER="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_SERVER"
12-
DIFFERENT_FM_DATABASE="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_DATABASE"
13-
DIFFERENT_OTTO_API_KEY="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/OTTO_API_KEY"
14-
11+
# fmdapi & typegen secrets
1512
FM_SERVER="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_SERVER"
1613
FM_DATABASE="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_DATABASE"
1714
OTTO_API_KEY="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/OTTO_API_KEY"
1815
FM_USERNAME="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/username"
1916
FM_PASSWORD="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/password"
20-
21-
# Test environment variables
17+
DIFFERENT_FM_SERVER="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_SERVER"
18+
DIFFERENT_FM_DATABASE="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_DATABASE"
19+
DIFFERENT_OTTO_API_KEY="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/OTTO_API_KEY"
2220
TEST_FM_SERVER="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_SERVER"
2321
TEST_FM_DATABASE="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/FM_DATABASE"
2422
TEST_OTTO_API_KEY="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/1Password env Values/OTTO_API_KEY"
2523
TEST_USERNAME="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/username"
2624
TEST_PASSWORD="op://xrs5sehh2gm36me62rlfpmsyde/ztcjgvgc4i5aa6cjh5vudpco4m/password"
25+
26+
# fmodata secrets
27+
FMODATA_SERVER_URL="op://xrs5sehh2gm36me62rlfpmsyde/fmdapi_test/1Password env Values/FM_SERVER"
28+
FMODATA_DATABASE="op://xrs5sehh2gm36me62rlfpmsyde/fmdapi_test/1Password env Values/FM_DATABASE"
29+
FMODATA_API_KEY="op://xrs5sehh2gm36me62rlfpmsyde/fmdapi_test/1Password env Values/OTTO_API_KEY"
30+
FMODATA_USERNAME="op://xrs5sehh2gm36me62rlfpmsyde/fmdapi_test/username"
31+
FMODATA_PASSWORD="op://xrs5sehh2gm36me62rlfpmsyde/fmdapi_test/password"

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"build": "turbo run build --filter={./packages/*} --filter=@proofkit/docs",
55
"dev": "turbo run dev",
66
"lint": "turbo run lint",
7+
"typecheck": "turbo run typecheck",
78
"clean": "turbo run clean && rm -rf node_modules",
89
"format": "biome format --write .",
910
"changeset": "changeset",
@@ -22,12 +23,12 @@
2223
"husky": "^9.1.7",
2324
"knip": "^5.56.0",
2425
"lint-staged": "^16.2.7",
25-
"turbo": "^2.5.4",
26+
"turbo": "^2.7.3",
2627
"typescript": "^5.9.3",
2728
"ultracite": "7.0.8",
2829
"vitest": "^4.0.7"
2930
},
30-
"packageManager": "pnpm@10.14.0",
31+
"packageManager": "pnpm@10.27.0",
3132
"engines": {
3233
"node": ">=18"
3334
},

packages/better-auth/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"scripts": {
88
"dev": "pnpm build:watch",
99
"test": "vitest run",
10+
"typecheck": "tsc --noEmit",
1011
"build": "vite build && publint --strict",
1112
"build:watch": "vite build --watch",
1213
"ci": "pnpm run build && pnpm run test",

packages/fmdapi/op.env

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

packages/fmdapi/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"dev": "tsc --watch",
4646
"ci": "pnpm build && pnpm check-format && pnpm publint --strict && pnpm test",
4747
"test": "vitest run",
48-
"setup-env": "op inject -i op.env -o .env.local -f",
48+
"typecheck": "tsc --noEmit",
49+
"setup-env": "op inject -i ../../op.env -o .env.local -f",
4950
"changeset": "changeset",
5051
"release": "pnpm build && changeset publish --access public",
5152
"knip": "knip",

packages/fmodata/op.env

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

packages/fmodata/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
"lint:fix": "pnpm lint --fix",
2929
"dev": "tsc --watch",
3030
"test": "vitest run --typecheck",
31-
"tsc": "tsc --noEmit",
31+
"typecheck": "tsc --noEmit",
3232
"test:typecheck": "vitest run --typecheck",
3333
"test:watch": "vitest --typecheck",
3434
"test:build": "pnpm build && TEST_BUILD=true vitest run --typecheck",
3535
"test:watch:build": "TEST_BUILD=true vitest --typecheck",
36-
"test:e2e": "op inject -i op.env -o .env.local -f && vitest run tests/e2e.test.ts",
37-
"capture": "op inject -i op.env -o .env.local -f && tsx scripts/capture-responses.ts",
36+
"test:e2e": "op inject -i ../../op.env -o .env.local -f && vitest run tests/e2e.test.ts",
37+
"test:e2e:ci": "vitest run tests/e2e.test.ts",
38+
"capture": "op inject -i ../../op.env -o .env.local -f && tsx scripts/capture-responses.ts",
3839
"knip": "knip",
3940
"pub:alpha": "bun run scripts/publish-alpha.ts",
4041
"global:link": "pnpm link --global"

packages/fmodata/tests/tsconfig.build.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@
3535
],
3636
"exclude": ["../src/**/*", "../dist/**/*.js", "../dist/**/*.js.map"]
3737
}
38-

0 commit comments

Comments
 (0)