Skip to content

Commit 015fd12

Browse files
committed
ci: publish experimental snapshots from the experimental branch
- release-experimental.yml publishes better-call@0.0.0-experimental.<sha> under the 'experimental' dist-tag on pushes to the experimental branch - run CI on the experimental branch - drop unused deps and dead ./client and ./node exports from the experimental package - remove the example app and its references
1 parent 5b8ee05 commit 015fd12

15 files changed

Lines changed: 63 additions & 341 deletions

File tree

.cspell.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"attw",
1414
"bumpp",
1515
"arktype",
16+
"nvmrc",
1617

1718
// auth words
1819
"scim",

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ on:
55
branches:
66
- main
77
- v*.x
8+
- experimental
89
push:
910
branches:
1011
- main
1112
- v*.x
13+
- experimental
1214
merge_group: {}
1315

1416
jobs:
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release Experimental
2+
3+
on:
4+
push:
5+
branches:
6+
- experimental
7+
paths:
8+
- 'packages/experimental/**'
9+
- '.github/workflows/release-experimental.yml'
10+
workflow_dispatch: {}
11+
12+
permissions: {}
13+
14+
concurrency:
15+
group: release-experimental
16+
cancel-in-progress: false
17+
18+
jobs:
19+
release:
20+
runs-on: ubuntu-latest
21+
environment: release
22+
permissions:
23+
contents: read
24+
id-token: write
25+
steps:
26+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
with:
28+
fetch-depth: 0
29+
30+
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
31+
32+
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
33+
with:
34+
node-version-file: '.nvmrc'
35+
registry-url: 'https://registry.npmjs.org'
36+
cache: pnpm
37+
38+
- run: pnpm install --frozen-lockfile
39+
40+
- name: Build
41+
run: pnpm --filter ./packages/experimental build
42+
43+
- name: Stamp snapshot version
44+
working-directory: packages/experimental
45+
run: |
46+
VERSION="0.0.0-experimental.$(git rev-parse --short=8 HEAD)"
47+
npm pkg set version="$VERSION"
48+
echo "Publishing better-call@$VERSION under the 'experimental' dist-tag"
49+
50+
- name: Publish to npm
51+
run: pnpm --filter ./packages/experimental publish --provenance --access public --no-git-checks --tag experimental

example/package.json

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

example/src/arktype.ts

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

example/src/effect.ts

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

example/src/valibot.ts

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

example/src/zod.ts

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

example/tsconfig.json

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

knip.jsonc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema-jsonc.json",
33
"workspaces": {
4-
"./example": {
5-
"project": ["example/**/*.ts!"],
4+
"./packages/*": {
5+
"project": ["src/**/*.ts!"],
66
"ignoreDependencies": [
7-
"better-call",
8-
"zod",
9-
"arktype",
10-
"effect",
11-
"valibot"
7+
// implicit dependencies
8+
"zod"
129
]
1310
},
14-
"./packages/*": {
11+
// WIP package: treat all sources as entries so the settling export
12+
// surface isn't policed; unused dependencies are still reported.
13+
"./packages/experimental": {
14+
"entry": ["src/**/*.ts!"],
1515
"project": ["src/**/*.ts!"],
1616
"ignoreDependencies": [
1717
// implicit dependencies

0 commit comments

Comments
 (0)