Skip to content

Commit d272277

Browse files
committed
feat(release): add GitHub Actions workflow for automated release process and update package.json scripts
1 parent 4c5d4e9 commit d272277

File tree

6 files changed

+49
-9
lines changed

6 files changed

+49
-9
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
version:
8+
timeout-minutes: 15
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code repository
12+
uses: actions/checkout@v4
13+
14+
- name: Setup pnpm
15+
uses: pnpm/action-setup@v4
16+
17+
- name: Setup node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
cache: pnpm
22+
23+
- name: Install dependencies
24+
run: pnpm install
25+
26+
- name: Build dist
27+
run: pnpm build
28+
29+
- name: Create and publish versions
30+
uses: changesets/action@v1
31+
with:
32+
commit: 'chore: update versions'
33+
title: 'chore: update versions'
34+
publish: pnpm ci:publish
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
"scripts": {
1818
"build:docs": "pnpm --filter @aibetter/ui-docs generate",
1919
"build": "pnpm --filter \"./packages/**\" build",
20+
"postbuild": "eslint --fix ./packages/theme/src/css/theme.css",
2021
"lint": "eslint .",
2122
"lint:fix": "eslint . --fix",
2223
"bump": "changeset",
2324
"release": "changeset version",
24-
"prepare": "husky && aib sync"
25+
"prepare": "husky && aib sync",
26+
"ci:publish": "pnpm publish -r --access=public"
2527
},
2628
"devDependencies": {
2729
"@aibetter/aib": "^0.1.3",

packages/theme/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@aibetter/ui-theme",
33
"type": "module",
44
"version": "0.0.0",
5+
"private": false,
56
"packageManager": "pnpm@10.13.1",
67
"description": "The theme of the UI component library specially adapted for AI programming.",
78
"author": "litingyes",
@@ -15,12 +16,11 @@
1516
"color"
1617
],
1718
"exports": {
18-
".": {
19-
"style": "./src/css/index.css"
20-
}
19+
".": "./src/css/index.css",
20+
"./theme.css": "./src/css/theme.css"
2121
},
2222
"scripts": {
23-
"build:css": "jiti scripts/build.ts && eslint --fix ./src/css/theme.css"
23+
"build": "jiti scripts/build.ts"
2424
},
2525
"peerDependencies": {
2626
"tailwindcss": "catalog:"

packages/theme/src/css/theme.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105

106106
--color-background: #fff;
107107
--color-foreground: #000;
108-
--color-foreground-reverse: #fff;
109108

110109
--color-text-primary: #000;
111110
--color-text-secondary: oklch(21% 0.034 264.665);

packages/theme/src/utils/resolveTheme.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ export function resolveThemeOptions(options?: Partial<ThemeOptions>) {
3333

3434
return resolvedOptions
3535
}
36-
37-
// export function

packages/vue/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@aibetter/ui-vue",
33
"type": "module",
4-
"version": "0.0.0",
4+
"version": "0.1.0",
5+
"private": false,
56
"packageManager": "pnpm@10.13.1",
67
"description": "The vue components of the UI component library specially adapted for AI programming.",
78
"author": "litingyes",
@@ -22,6 +23,9 @@
2223
"main": "./dist/index.js",
2324
"module": "./dist/index.js",
2425
"types": "./dist/index.d.ts",
26+
"files": [
27+
"dist"
28+
],
2529
"scripts": {
2630
"dev": "vite build --watch",
2731
"build": "vite build"

0 commit comments

Comments
 (0)