Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@timeline/demo"]
}
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: CI

on:
# Trigger on push to dev or main branches
push:
branches: [dev, main]

# Trigger on pull requests targeting dev or main
pull_request:
branches: [dev, main]

# Allow manual workflow dispatch
workflow_dispatch:

jobs:
validate:
name: Build & Test
runs-on: ubuntu-latest

steps:
# ===== SETUP =====

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changeset validation

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

# ===== DEV + MAIN: Core validation steps =====

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build all packages
run: pnpm run build
env:
CI: true

- name: Run tests
run: pnpm run test

- name: Verify package outputs
run: |
# Verify all packages built successfully
for pkg in core react ui; do
if [ ! -d "packages/$pkg/dist" ]; then
echo "❌ @timeline/$pkg build failed - no dist directory"
exit 1
fi
if [ ! -f "packages/$pkg/dist/index.d.ts" ]; then
echo "❌ @timeline/$pkg missing type declarations"
exit 1
fi
done

# Verify core internal exports
if [ ! -f "packages/core/dist/internal.d.ts" ]; then
echo "❌ @timeline/core missing internal type declarations"
exit 1
fi

echo "✅ All packages built successfully with type declarations"

# ===== MAIN ONLY: Release validation steps =====

- name: Verify changeset status
if: github.ref == 'refs/heads/main'
run: |
echo "📋 Checking changeset status for main branch..."
if pnpm changeset status 2>&1 | grep -q "no changesets were found"; then
echo "⚠️ Warning: Changes detected without changesets"
echo "ℹ️ Run 'pnpm changeset' to create a changeset before merging to main"
echo "ℹ️ Or run 'pnpm changeset add --empty' if no release is needed"
exit 1
else
pnpm changeset status
echo "✅ Changeset validation passed"
fi

- name: Check for uncommitted changes
if: github.ref == 'refs/heads/main'
run: |
echo "🔍 Verifying no uncommitted changes after build..."
if ! git diff --exit-code; then
echo "❌ Build produced uncommitted changes"
git diff
exit 1
fi
echo "✅ No uncommitted changes detected"

- name: Publish dry run
if: github.ref == 'refs/heads/main'
run: |
echo "🧪 Running publish dry run..."
pnpm changeset publish --dry-run
echo "✅ Publish dry run completed successfully"

Loading