Skip to content

Commit aea44e0

Browse files
committed
Update API imports, increment package version to 0.0.6, and enhance GitHub Actions workflow for version checking before publishing
1 parent 6a9a2a8 commit aea44e0

File tree

6 files changed

+165
-58
lines changed

6 files changed

+165
-58
lines changed

.github/workflows/npm-publish.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@ jobs:
2929
- uses: oven-sh/setup-bun@v2
3030
- run: pnpm install
3131
- run: pnpm build
32-
- run: |
32+
- run: bunx kksh@latest verify --publish
33+
- name: Check if version is already published
34+
run: |
35+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
3336
PACKAGE_NAME=$(jq -r '.name' package.json)
34-
PACKAGE_VERSION=$(jq -r '.version' package.json)
35-
36-
# Get the version from npm registry
37-
REGISTRY_VERSION=$(npm show "$PACKAGE_NAME" version)
38-
39-
# Compare versions
40-
if [ "$PACKAGE_VERSION" == "$REGISTRY_VERSION" ]; then
41-
echo "Version $PACKAGE_VERSION already exists in the npm registry."
42-
exit 0
43-
else
44-
echo "Version $PACKAGE_VERSION does not exist in the npm registry. Proceeding..."
45-
npm publish --provenance --access public
46-
fi
37+
npm view $PACKAGE_NAME@$PACKAGE_VERSION
38+
continue-on-error: true
39+
id: check_version
40+
- name: Publish
41+
if: steps.check_version.outcome != 'success'
42+
run: npm publish --provenance --access public
4743
env:
4844
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "kunkun-ext-sqlite-browser",
44
"license": "MIT",
55
"repository": "https://github.com/kunkunsh/kunkun-ext-sqlite-browser",
6-
"version": "0.0.5",
6+
"version": "0.0.6",
77
"kunkun": {
88
"name": "SQLite Browser",
99
"shortDescription": "SQLite Browser",
@@ -66,7 +66,7 @@
6666
"format": "prettier --write ."
6767
},
6868
"dependencies": {
69-
"@kksh/api": "^0.0.52",
69+
"@kksh/api": "^0.1.1",
7070
"@kksh/svelte5": "0.1.10",
7171
"@tanstack/table-core": "^8.20.5",
7272
"clsx": "^2.1.1",

pnpm-lock.yaml

Lines changed: 149 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/ThemeCustomizer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { ThemeCustomizerButton, type ThemeConfig, updateTheme } from '@kksh/svelte5';
3-
import { ui } from '@kksh/api/ui/iframe';
3+
import { ui } from '@kksh/api/ui/custom';
44
import { onMount } from 'svelte';
55
66
let config: ThemeConfig = {

0 commit comments

Comments
 (0)