Skip to content

Commit adf46d6

Browse files
authored
Initial commit
0 parents  commit adf46d6

22 files changed

+8394
-0
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/pr-checks.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
types: [ opened, synchronize ]
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
20+
- uses: pnpm/action-setup@v2
21+
with:
22+
version: 10
23+
24+
- name: Install dependencies
25+
run: pnpm install
26+
27+
- name: Typecheck
28+
run: pnpm typecheck
29+
30+
- name: Lint
31+
run: pnpm lint
32+
33+
- name: Test
34+
run: pnpm test
35+
36+
- name: Build
37+
run: pnpm build
38+
39+
# - name: Require changesets
40+
# run: pnpm changeset status --since=main
41+
42+

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Release (Changesets 🦋)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
CI: true
11+
12+
jobs:
13+
version:
14+
timeout-minutes: 15
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
id-token: write
20+
actions: write
21+
steps:
22+
- name: Checkout code repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
28+
- name: Setup node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Typecheck
38+
run: pnpm typecheck
39+
40+
- name: Lint
41+
run: pnpm lint
42+
43+
- name: Test
44+
run: pnpm test
45+
46+
- name: Build
47+
run: pnpm build
48+
49+
- name: Format
50+
run: pnpm format
51+
52+
- name: Version Update 🦋
53+
uses: changesets/action@v1
54+
with:
55+
commit: "🦋 New version release"
56+
title: "🦋 New version release"
57+
publish: pnpm ci:publish
58+
createGithubReleases: true
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
NPM_TOKEN: ${{ secrets.SMOOAI_NPM_TOKEN }}
62+
63+
- name: Auto-Merge Changeset PR
64+
run: |
65+
PR_NUMBER=$(gh pr list --state open --head changeset-release/main --json number --jq '.[0].number')
66+
67+
if [[ -n "$PR_NUMBER" && "$PR_NUMBER" != "null" ]]; then
68+
echo "Found Changeset PR #$PR_NUMBER, attempting to auto-merge..."
69+
gh pr merge "$PR_NUMBER" --auto --squash
70+
71+
# Re-trigger the Release workflow
72+
echo "Re-triggering the release workflow..."
73+
gh workflow run release.yml
74+
else
75+
echo "No open Changeset PR found, skipping merge."
76+
fi
77+
env:
78+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
lib-cov
2+
*.seed
3+
*.log
4+
*.csv
5+
*.dat
6+
*.out
7+
*.pid
8+
*.gz
9+
*.swp
10+
11+
pids
12+
logs
13+
results
14+
tmp
15+
16+
# Build
17+
public/css/main.css
18+
19+
# Coverage reports
20+
coverage
21+
22+
# API keys and secrets
23+
.env
24+
25+
# Dependency directory
26+
node_modules
27+
bower_components
28+
29+
# Editors
30+
.idea
31+
*.iml
32+
33+
# OS metadata
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Ignore built ts files
38+
dist/**/*
39+
40+
# ignore yarn.lock
41+
yarn.lock
42+
43+
# ignore package-lock.json
44+
package-lock.json

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pnpm lint-staged
2+
pnpm typecheck
3+
pnpm test
4+
pnpm build
5+
pnpm format
6+
git add .

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{ts,tsx}": ["eslint src/ --fix"]
3+
}

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
auto-install-peers=true
2+
inject-workspace-packages=true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.13.0

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @smooai/library-template
2+
3+
## 1.0.2
4+
5+
### Patch Changes
6+
7+
- 44fd23b: Fix publish for Github releases.
8+
9+
## 1.0.1
10+
11+
### Patch Changes
12+
13+
- 52c9eb1: Initial check-in.

0 commit comments

Comments
 (0)