File tree Expand file tree Collapse file tree 2 files changed +51
-3
lines changed Expand file tree Collapse file tree 2 files changed +51
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+
8
+ env :
9
+ NODE_VERSION : 20
10
+ PNPM_VERSION : 9
11
+
12
+ jobs :
13
+ publish-js :
14
+ runs-on : ubuntu-latest
15
+ timeout-minutes : 5
16
+
17
+ steps :
18
+ - name : Checkout project
19
+ uses : actions/checkout@v4
20
+
21
+ - name : Setup Node.js
22
+ uses : actions/setup-node@v4
23
+ with :
24
+ node-version : ${{ env.NODE_VERSION }}
25
+
26
+ - name : Setup pnpm
27
+ uses : pnpm/action-setup@v4.0.0
28
+ with :
29
+ version : ${{ env.PNPM_VERSION }}
30
+ run_install : true
31
+
32
+ - name : Publish
33
+ shell : bash
34
+ env :
35
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
36
+ run : |
37
+ # Read the current version from package.json
38
+ CURRENT_VERSION=$(jq -r '.version' ./package.json)
39
+
40
+ # Check if the version contains "-beta"
41
+ if [[ "$CURRENT_VERSION" == *"-beta"* ]]; then
42
+ echo "Publishing $CURRENT_VERSION as beta tag"
43
+ pnpm publish --access public --tag beta
44
+ else
45
+ echo "Publishing $CURRENT_VERSION as latest tag"
46
+ pnpm publish --access public
47
+ fi
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @caido-community/create-plugin" ,
3
- "version" : " 1. 0.0" ,
4
- "description" : " " ,
3
+ "version" : " 0.0.1 " ,
4
+ "description" : " Initializer for Caido plugins " ,
5
5
"bin" : {
6
6
"create-plugin" : " ./dist/index.mjs"
7
7
},
8
8
"scripts" : {
9
9
"build" : " unbuild"
10
10
},
11
11
"files" : [
12
- " dist"
12
+ " dist" ,
13
+ " templates"
13
14
],
14
15
"engines" : {
15
16
"node" : " ^18.0.0 || >=20.0.0"
You can’t perform that action at this time.
0 commit comments