Skip to content

Commit 81843fe

Browse files
author
linchengyu
committed
chore: improve CI and update deps
1 parent d1c9131 commit 81843fe

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cache: 'npm'
2828

2929
- name: Install dependencies
30-
run: npm ci
30+
run: npm ci --prefer-offline --no-audit
3131

3232
- name: Build
3333
run: npm run build

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7+
- '*.*.*'
78

89
jobs:
910
publish:
@@ -24,7 +25,7 @@ jobs:
2425
registry-url: 'https://registry.npmjs.org'
2526

2627
- name: Install dependencies
27-
run: npm ci
28+
run: npm ci --prefer-offline --no-audit
2829

2930
- name: Build
3031
run: npm run build
@@ -35,7 +36,8 @@ jobs:
3536

3637
- name: Verify package.json version matches tag
3738
run: |
38-
TAG_VERSION=${GITHUB_REF#refs/tags/v}
39+
TAG_NAME=${GITHUB_REF#refs/tags/}
40+
TAG_VERSION=${TAG_NAME#v} # Remove 'v' prefix if exists
3941
PACKAGE_VERSION=$(node -p "require('./package.json').version")
4042
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
4143
echo "Error: Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"
@@ -53,7 +55,7 @@ jobs:
5355
env:
5456
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5557
with:
56-
tag_name: ${{ github.ref }}
57-
release_name: Release ${{ github.ref }}
58+
tag_name: ${{ github.ref_name }}
59+
release_name: Release ${{ github.ref_name }}
5860
draft: false
5961
prerelease: false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SwitchBot Channel is an official channel plugin for the OpenClaw platform that r
2121
### System Requirements
2222

2323
- **OpenClaw**: >= 2026.1.0
24-
- **Node.js**: >= 18.0.0
24+
- **Node.js**: >= 20.0.0
2525
- **SwitchBot App**: Latest version
2626

2727
### Step 1: Install Plugin

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
},
3939
"devDependencies": {
4040
"@types/jest": "^29.0.0",
41-
"@types/node": "^18.0.0",
41+
"@types/node": "^20.0.0",
4242
"jest": "^29.0.0",
4343
"ts-jest": "^29.0.0",
4444
"typescript": "^5.0.0"
4545
},
4646
"dependencies": {
47-
"mqtt": "5.10.3",
48-
"zod": "3.24.2"
47+
"mqtt": "^5.10.3",
48+
"zod": "^3.24.2"
4949
},
5050
"peerDependencies": {
5151
"openclaw": ">=2026.1.0"

0 commit comments

Comments
 (0)