Skip to content

Commit a369d61

Browse files
Merge pull request #1 from no-witness-labs/feat/first-release
feat/first release
2 parents 6dd29f3 + 22a1274 commit a369d61

File tree

380 files changed

+1596726
-1
lines changed

Some content is hidden

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

380 files changed

+1596726
-1
lines changed

.changeset/config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changelog": "@changesets/changelog-github",
3+
"commit": false,
4+
"fixed": [],
5+
"linked": [],
6+
"access": "public",
7+
"baseBranch": "main",
8+
"updateInternalDependencies": "patch",
9+
"ignore": []
10+
}

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/CODEOWNERS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Global owners
2+
* @no-witness-labs
3+
4+
# Evolution SDK core
5+
/packages/evolution/ @no-witness-labs
6+
7+
# Documentation
8+
/docs/ @no-witness-labs
9+
/README.md @no-witness-labs
10+
11+
# CI/CD and GitHub configuration
12+
/.github/ @no-witness-labs
13+
/.changeset/ @no-witness-labs
14+
15+
# Package configuration
16+
/package.json @no-witness-labs
17+
/turbo.json @no-witness-labs
18+
/tsconfig*.json @no-witness-labs

.github/workflows/ci.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
lint:
16+
name: ⬣ ESLint
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: ⬇️ Checkout repo
20+
uses: actions/checkout@v4
21+
22+
- name: 📦 Install pnpm
23+
uses: pnpm/action-setup@v4
24+
25+
- name: ⎔ Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'pnpm'
30+
31+
- name: 📦 Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: 🔬 Lint
35+
run: pnpm turbo run lint --affected
36+
37+
typecheck:
38+
name: ʦ TypeScript
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: ⬇️ Checkout repo
42+
uses: actions/checkout@v4
43+
44+
- name: 📦 Install pnpm
45+
uses: pnpm/action-setup@v4
46+
47+
- name: ⎔ Setup Node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20
51+
cache: 'pnpm'
52+
53+
- name: 📦 Install dependencies
54+
run: pnpm install --frozen-lockfile
55+
56+
- name: 🔎 Type check
57+
run: pnpm turbo run type-check --affected
58+
59+
test:
60+
name: 🧪 Test
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: ⬇️ Checkout repo
64+
uses: actions/checkout@v4
65+
66+
- name: 📦 Install pnpm
67+
uses: pnpm/action-setup@v4
68+
69+
- name: ⎔ Setup Node.js
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: 20
73+
cache: 'pnpm'
74+
75+
- name: 📦 Install dependencies
76+
run: pnpm install --frozen-lockfile
77+
78+
- name: 🧪 Run tests
79+
run: pnpm turbo run test --affected
80+
81+
build:
82+
name: 🏗 Build
83+
runs-on: ubuntu-latest
84+
steps:
85+
- name: ⬇️ Checkout repo
86+
uses: actions/checkout@v4
87+
88+
- name: 📦 Install pnpm
89+
uses: pnpm/action-setup@v4
90+
91+
- name: ⎔ Setup Node.js
92+
uses: actions/setup-node@v4
93+
with:
94+
node-version: 20
95+
cache: 'pnpm'
96+
97+
- name: 📦 Install dependencies
98+
run: pnpm install --frozen-lockfile
99+
100+
- name: 🏗 Build packages
101+
run: pnpm turbo run build --affected
102+
103+
- name: 📄 Generate docs (validate examples)
104+
run: pnpm turbo run docgen --affected || echo "No docgen script found, skipping"
105+
106+
# All jobs must pass
107+
ci:
108+
name: ✅ CI
109+
runs-on: ubuntu-latest
110+
if: always()
111+
needs: [lint, typecheck, test, build]
112+
steps:
113+
- name: ✅ All jobs passed
114+
if: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
115+
run: exit 0
116+
117+
- name: ❌ Some jobs failed
118+
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
119+
run: exit 1

.github/workflows/docs.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'packages/evolution/src/**'
9+
- 'packages/evolution/docs/**'
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
outputs:
29+
should_build: ${{ steps.changes.outputs.should_build }}
30+
steps:
31+
- name: ⬇️ Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0 # Need full history for turbo-ignore
35+
36+
- name: 🔍 Check for documentation changes
37+
id: changes
38+
run: |
39+
npx turbo-ignore docs
40+
echo "should_build=$?" >> $GITHUB_OUTPUT
41+
continue-on-error: true
42+
43+
- name: 📦 Install pnpm
44+
if: steps.changes.outputs.should_build == '1'
45+
uses: pnpm/action-setup@v4
46+
47+
- name: ⎔ Setup Node.js
48+
if: steps.changes.outputs.should_build == '1'
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: 20
52+
cache: 'pnpm'
53+
54+
- name: 🔧 Setup Pages
55+
if: steps.changes.outputs.should_build == '1'
56+
uses: actions/configure-pages@v4
57+
with:
58+
# Automatically inject basePath in your Next.js configuration file and disable
59+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
60+
#
61+
# You may remove this line if you want to manage the configuration yourself.
62+
static_site_generator: next
63+
64+
- name: 📦 Install dependencies
65+
if: steps.changes.outputs.should_build == '1'
66+
run: pnpm install --frozen-lockfile
67+
68+
- name: 🏗 Build packages (required for docs)
69+
if: steps.changes.outputs.should_build == '1'
70+
run: pnpm turbo run build
71+
72+
- name: 📄 Generate Evolution SDK docs
73+
if: steps.changes.outputs.should_build == '1'
74+
run: pnpm turbo run docgen
75+
working-directory: packages/evolution
76+
77+
- name: 📚 Copy Evolution docs to website
78+
if: steps.changes.outputs.should_build == '1'
79+
run: node scripts/copy-evolution-docs.mjs
80+
working-directory: docs
81+
82+
- name: 🏗 Build documentation with Next.js
83+
if: steps.changes.outputs.should_build == '1'
84+
run: pnpm turbo run build
85+
working-directory: docs
86+
87+
- name: 📤 Upload artifact
88+
if: steps.changes.outputs.should_build == '1'
89+
uses: actions/upload-pages-artifact@v3
90+
with:
91+
path: ./docs/out
92+
93+
# Deployment job
94+
deploy:
95+
environment:
96+
name: github-pages
97+
url: ${{ steps.deployment.outputs.page_url }}
98+
runs-on: ubuntu-latest
99+
needs: build
100+
if: needs.build.outputs.should_build == '1' || github.event_name == 'workflow_dispatch'
101+
steps:
102+
- name: 🚀 Deploy to GitHub Pages
103+
id: deployment
104+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: 🚀 Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: ⬇️ Checkout repo
16+
uses: actions/checkout@v4
17+
with:
18+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
19+
fetch-depth: 0
20+
21+
- name: 📦 Install pnpm
22+
uses: pnpm/action-setup@v4
23+
24+
- name: ⎔ Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: 'pnpm'
29+
registry-url: 'https://registry.npmjs.org/'
30+
31+
- name: 📦 Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: 🏗 Build packages
35+
run: pnpm turbo run build
36+
37+
- name: 🧪 Run tests
38+
run: pnpm turbo run test
39+
40+
- name: 📄 Generate docs
41+
run: pnpm turbo run docgen || echo "No docgen script found, skipping"
42+
43+
- name: 🦋 Create Release Pull Request or Publish to npm
44+
id: changesets
45+
uses: changesets/action@v1
46+
with:
47+
# This uses our custom publish script that builds before publishing
48+
publish: pnpm changeset-publish
49+
title: "ci(changesets): version packages"
50+
commit: "ci(changesets): version packages"
51+
createGithubReleases: true
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
56+
- name: 📢 Send a Slack notification if a publish happened
57+
if: steps.changesets.outputs.published == 'true'
58+
# You can do something when a publish happens.
59+
run: echo "A new version of Evolution SDK was published!"
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Update Dependencies
2+
3+
on:
4+
schedule:
5+
# Run every Monday at 9:00 AM UTC
6+
- cron: '0 9 * * 1'
7+
workflow_dispatch:
8+
9+
jobs:
10+
update-dependencies:
11+
name: 🔄 Update Dependencies
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: ⬇️ Checkout repo
15+
uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: 📦 Install pnpm
20+
uses: pnpm/action-setup@v4
21+
22+
- name: ⎔ Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'pnpm'
27+
28+
- name: 📦 Install dependencies
29+
run: pnpm install
30+
31+
- name: 🔄 Update dependencies
32+
run: |
33+
pnpm update --latest --recursive
34+
pnpm install
35+
36+
- name: 🧪 Run tests
37+
run: pnpm turbo run test
38+
continue-on-error: true
39+
40+
- name: 🏗 Build packages
41+
run: pnpm turbo run build
42+
continue-on-error: true
43+
44+
- name: 📝 Create Pull Request
45+
uses: peter-evans/create-pull-request@v6
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
commit-message: 'chore: update dependencies'
49+
title: 'chore: update dependencies'
50+
body: |
51+
This PR updates all dependencies to their latest versions.
52+
53+
## Changes
54+
- Updated all dependencies to latest versions
55+
56+
## Testing
57+
- [ ] CI tests pass
58+
- [ ] Manual testing required
59+
60+
## Notes
61+
Please review the changes carefully and test thoroughly before merging.
62+
branch: chore/update-dependencies
63+
delete-branch: true
64+
base: main

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
temp/
2+
.turbo
3+
node_modules
4+
dist
5+
*.log
6+
.DS_Store
7+
.direnv
8+
docs/out
9+
docs/.next

0 commit comments

Comments
 (0)