File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ name: Publish Package to npmjs.com
2
2
on :
3
3
release :
4
4
types : [published]
5
+ push :
6
+ tags :
7
+ - " v*"
5
8
jobs :
6
9
build-and-publish :
7
- if : github.event.release.target_commitish == 'main'
8
10
runs-on : ubuntu-latest
9
11
steps :
10
12
- name : Checkout
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ import { initCommand } from "~/commands/init.command"
14
14
import { loginCommand } from "~/commands/login.command"
15
15
import { addBlockCommand } from "./commands/block.command"
16
16
import { themeCommand } from "./commands/theme.command"
17
+ import { fileURLToPath } from "node:url"
18
+ import { dirname , resolve } from "node:path"
19
+ import { readFileSync } from "node:fs"
20
+
21
+ const __filename = fileURLToPath ( import . meta. url )
22
+ const __dirname = dirname ( __filename )
17
23
18
24
const generateFigletText = ( text : string , options : figlet . Options ) : Effect . Effect < string , Error > =>
19
25
Effect . async < string , Error > ( ( resume ) => {
@@ -75,9 +81,13 @@ const command = rootCommand.pipe(
75
81
] ) ,
76
82
)
77
83
84
+ const pkg = JSON . parse (
85
+ readFileSync ( resolve ( __dirname , "../package.json" ) , "utf-8" ) // adjust path sesuai struktur build lo
86
+ )
87
+
78
88
const cli = Command . run ( command , {
79
89
name : "Intent UI CLI" ,
80
- version : "v3.1.1" ,
90
+ version : pkg . version ,
81
91
} )
82
92
83
93
cli ( process . argv ) . pipe (
You can’t perform that action at this time.
0 commit comments