Skip to content

Commit fe370bd

Browse files
committed
feat: add kiro support and release workflow
1 parent 8466b24 commit fe370bd

10 files changed

Lines changed: 219 additions & 29 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import fs from "node:fs";
2+
import path from "node:path";
3+
4+
const changelogPath = path.join(process.cwd(), "CHANGELOG.md");
5+
6+
try {
7+
const content = fs.readFileSync(changelogPath, "utf8");
8+
const lines = content.split("\n");
9+
10+
let capture = false;
11+
const log = [];
12+
13+
const headerRegex = /^#+ \[?\d+\.\d+\.\d+/;
14+
15+
for (const line of lines) {
16+
if (headerRegex.test(line)) {
17+
if (capture) {
18+
break;
19+
}
20+
capture = true;
21+
continue;
22+
}
23+
24+
if (capture) {
25+
log.push(line);
26+
}
27+
}
28+
29+
console.log(log.join("\n").trim());
30+
} catch (error) {
31+
console.error("Error reading CHANGELOG.md:", error);
32+
process.exit(1);
33+
}

.github/workflows/release.yml

Lines changed: 181 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,109 @@
1-
name: Build Release
1+
name: Build & Release
22

33
on:
44
workflow_dispatch:
5-
release:
6-
types: [published]
5+
inputs:
6+
release_type:
7+
description: "Release type"
8+
required: true
9+
default: "patch"
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
715

816
permissions:
917
contents: write
1018

1119
jobs:
12-
build:
20+
prepare-release:
21+
runs-on: ubuntu-latest
22+
if: github.event_name == 'workflow_dispatch'
23+
outputs:
24+
new_tag: ${{ steps.get_tag.outputs.tag }}
25+
changelog: ${{ steps.extract_changelog.outputs.notes }}
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Setup pnpm
34+
uses: pnpm/action-setup@v4
35+
with:
36+
version: "10"
37+
run_install: false
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: "20"
43+
cache: "pnpm"
44+
cache-dependency-path: "pnpm-lock.yaml"
45+
46+
- name: Install dependencies
47+
run: pnpm install --frozen-lockfile
48+
49+
- name: Configure Git
50+
run: |
51+
git config --global user.name "github-actions[bot]"
52+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
53+
54+
- name: Bump version (no commit/tag)
55+
run: pnpm dlx standard-version --release-as ${{ inputs.release_type }} --skip.tag --skip.commit
56+
57+
- name: Sync Tauri version
58+
run: |
59+
node -e "const fs=require('fs');const pkg=require('./package.json');const path='src-tauri/tauri.conf.json';const conf=JSON.parse(fs.readFileSync(path,'utf8'));conf.version=pkg.version;fs.writeFileSync(path, JSON.stringify(conf,null,2)+'\\n');"
60+
61+
- name: Commit and tag
62+
run: |
63+
VERSION=$(node -p "require('./package.json').version")
64+
git add package.json pnpm-lock.yaml CHANGELOG.md src-tauri/tauri.conf.json
65+
git commit -m "chore(release): v${VERSION}"
66+
git tag "v${VERSION}"
67+
git push --follow-tags origin HEAD:main
68+
69+
- name: Get new tag
70+
id: get_tag
71+
run: |
72+
TAG=$(git describe --tags --abbrev=0)
73+
echo "tag=$TAG" >> $GITHUB_OUTPUT
74+
echo "Generated new tag: $TAG"
75+
76+
- name: Extract Changelog
77+
id: extract_changelog
78+
run: |
79+
CHANGELOG_CONTENT=$(node .github/scripts/extract-changelog.js)
80+
echo "notes<<EOF" >> $GITHUB_OUTPUT
81+
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
82+
echo "EOF" >> $GITHUB_OUTPUT
83+
84+
build-mac:
85+
needs: [prepare-release]
1386
strategy:
14-
fail-fast: false
1587
matrix:
16-
os: [macos-latest, windows-latest]
88+
include:
89+
- os: macos-13
90+
arch: x64
91+
- os: macos-14
92+
arch: arm64
1793
runs-on: ${{ matrix.os }}
18-
1994
steps:
20-
- name: Checkout
95+
- name: Checkout code
2196
uses: actions/checkout@v4
97+
with:
98+
ref: ${{ needs.prepare-release.outputs.new_tag }}
2299

23100
- name: Setup pnpm
24101
uses: pnpm/action-setup@v4
25102
with:
26-
version: "9"
103+
version: "10"
27104
run_install: false
28105

29-
- name: Setup Node
106+
- name: Setup Node.js
30107
uses: actions/setup-node@v4
31108
with:
32109
node-version: "20"
@@ -36,30 +113,111 @@ jobs:
36113
- name: Setup Rust
37114
uses: dtolnay/rust-toolchain@stable
38115

39-
- name: Install Dependencies
40-
run: pnpm install
116+
- name: Install dependencies
117+
run: pnpm install --frozen-lockfile
41118

42-
- name: Build App
119+
- name: Build macOS app
43120
run: pnpm tauri build
44121

45-
- name: Upload Artifacts
122+
- name: Upload macOS artifacts
46123
uses: actions/upload-artifact@v4
47124
with:
48-
name: bundle-${{ matrix.os }}
125+
name: mac-artifacts-${{ matrix.arch }}
49126
path: |
50127
src-tauri/target/release/bundle/dmg/*.dmg
128+
src-tauri/target/release/bundle/macos/*.app
129+
if-no-files-found: error
130+
131+
build-win:
132+
needs: [prepare-release]
133+
runs-on: windows-latest
134+
steps:
135+
- name: Checkout code
136+
uses: actions/checkout@v4
137+
with:
138+
ref: ${{ needs.prepare-release.outputs.new_tag }}
139+
140+
- name: Setup pnpm
141+
uses: pnpm/action-setup@v4
142+
with:
143+
version: "10"
144+
run_install: false
145+
146+
- name: Setup Node.js
147+
uses: actions/setup-node@v4
148+
with:
149+
node-version: "20"
150+
cache: "pnpm"
151+
cache-dependency-path: "pnpm-lock.yaml"
152+
153+
- name: Setup Rust
154+
uses: dtolnay/rust-toolchain@stable
155+
156+
- name: Install dependencies
157+
run: pnpm install --frozen-lockfile
158+
159+
- name: Build Windows app
160+
run: pnpm tauri build
161+
162+
- name: Upload Windows artifacts
163+
uses: actions/upload-artifact@v4
164+
with:
165+
name: win-artifacts
166+
path: |
51167
src-tauri/target/release/bundle/msi/*.msi
168+
src-tauri/target/release/bundle/nsis/*.exe
169+
if-no-files-found: error
52170

53-
- name: Upload Release Assets (macOS)
54-
if: github.event_name == 'release' && matrix.os == 'macos-latest'
55-
uses: softprops/action-gh-release@v2
171+
release:
172+
needs: [prepare-release, build-mac, build-win]
173+
runs-on: ubuntu-latest
174+
steps:
175+
- name: Download macOS artifacts
176+
uses: actions/download-artifact@v4
56177
with:
57-
files: |
58-
src-tauri/target/release/bundle/dmg/*.dmg
178+
pattern: mac-artifacts-*
179+
merge-multiple: true
180+
path: artifacts
181+
182+
- name: Download Windows artifacts
183+
uses: actions/download-artifact@v4
184+
with:
185+
name: win-artifacts
186+
path: artifacts
59187

60-
- name: Upload Release Assets (Windows)
61-
if: github.event_name == 'release' && matrix.os == 'windows-latest'
188+
- name: Create GitHub Release
62189
uses: softprops/action-gh-release@v2
63190
with:
191+
tag_name: ${{ needs.prepare-release.outputs.new_tag }}
192+
draft: false
193+
prerelease: false
64194
files: |
65-
src-tauri/target/release/bundle/msi/*.msi
195+
artifacts/**/skills-manager-gui*.dmg
196+
artifacts/**/skills-manager-gui*.msi
197+
artifacts/**/skills-manager-gui*.exe
198+
body: |
199+
## 🎉 新版本发布!
200+
201+
**注意:本项目暂无商业签名证书,安装时可能会提示安全警告。**
202+
203+
### 🍎 macOS 用户
204+
初次安装可能出现 “应用已损坏,无法打开” 或 “来自身份不明的开发者”。
205+
206+
请打开「终端」执行:
207+
208+
```bash
209+
xattr -cr /Applications/skills-manager-gui.app
210+
```
211+
212+
### 🪟 Windows 用户
213+
如果出现 SmartScreen 提示:
214+
215+
1. 点击 “更多信息”
216+
2. 点击 “仍要运行”
217+
218+
---
219+
220+
### 更新日志
221+
${{ needs.prepare-release.outputs.changelog }}
222+
env:
223+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
/dist
44
/src-tauri/target
55
/references
6+
/other

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- CodeBuddy: `.codebuddy/skills`
2323
- Codex: `.codex/skills`
2424
- Cursor: `.cursor/skills`
25+
- Kiro: `.kiro/skills`
2526
- Qoder: `.qoder/skills`
2627
- Trae: `.trae/skills`
2728
- VSCode: `.github/skills`

docs/screenshots/ide.png

-3.6 KB
Loading

docs/screenshots/local.png

-7.08 KB
Loading

docs/screenshots/market.png

-1.56 KB
Loading

src-tauri/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ fn scan_overview(request: LocalScanRequest) -> Result<Overview, String> {
515515
("CodeBuddy".to_string(), ".codebuddy/skills".to_string()),
516516
("Codex".to_string(), ".codex/skills".to_string()),
517517
("Cursor".to_string(), ".cursor/skills".to_string()),
518+
("Kiro".to_string(), ".kiro/skills".to_string()),
518519
("Qoder".to_string(), ".qoder/skills".to_string()),
519520
("Trae".to_string(), ".trae/skills".to_string()),
520521
("VSCode".to_string(), ".github/skills".to_string()),
@@ -625,6 +626,7 @@ fn uninstall_skill(request: UninstallRequest) -> Result<String, String> {
625626
".codebuddy/skills".to_string(),
626627
".codex/skills".to_string(),
627628
".cursor/skills".to_string(),
629+
".kiro/skills".to_string(),
628630
".qoder/skills".to_string(),
629631
".trae/skills".to_string(),
630632
".github/skills".to_string(),

src/App.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ const {
5959
const theme = ref<"light" | "dark">("light");
6060
const locale = ref<SupportedLocale>("zh-CN");
6161
62-
const localeOptions = computed(() =>
63-
supportedLocales.map((value) => ({
64-
value,
65-
label: value === "zh-CN" ? "中文" : "English"
66-
}))
67-
);
6862
6963
const applyTheme = (next: "light" | "dark") => {
7064
document.documentElement.setAttribute("data-theme", next);

src/composables/useSkillsManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const defaultIdeOptions: IdeOption[] = [
6060
{ id: "codebuddy", label: "CodeBuddy", globalDir: ".codebuddy/skills" },
6161
{ id: "codex", label: "Codex", globalDir: ".codex/skills" },
6262
{ id: "cursor", label: "Cursor", globalDir: ".cursor/skills" },
63+
{ id: "kiro", label: "Kiro", globalDir: ".kiro/skills" },
6364
{ id: "qoder", label: "Qoder", globalDir: ".qoder/skills" },
6465
{ id: "trae", label: "Trae", globalDir: ".trae/skills" },
6566
{ id: "vscode", label: "VSCode", globalDir: ".github/skills" },

0 commit comments

Comments
 (0)