File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 8
8
create-release :
9
9
runs-on : ubuntu-latest
10
10
steps :
11
- - uses : actions/checkout@v3
11
+ - uses : actions/checkout@v4
12
12
- name : ' Install NPM dependencies'
13
13
run : npm ci
14
14
- name : ' Install LDID'
24
24
- name : Upload Release
25
25
uses : ncipollo/release-action@v1
26
26
with :
27
- artifacts : ' dist/bin/wokwi-cli-*'
27
+ artifacts : ' dist/bin/wokwi-cli-*,dist/bin/version.json '
28
28
token : ${{ secrets.GITHUB_TOKEN }}
29
29
generateReleaseNotes : true
Original file line number Diff line number Diff line change 1
1
import { execSync } from 'child_process' ;
2
2
import { build } from 'esbuild' ;
3
- import { readFileSync } from 'fs' ;
3
+ import { mkdirSync , readFileSync , writeFileSync } from 'fs' ;
4
4
5
5
const { version } = JSON . parse ( readFileSync ( 'package.json' , 'utf8' ) ) ;
6
6
const sha = execSync ( 'git rev-parse --short=12 HEAD' ) . toString ( ) . trim ( ) ;
7
7
8
+ const installCommands = {
9
+ win32 : 'iwr https://wokwi.com/ci/install.ps1 -useb | iex' ,
10
+ default : 'curl -L https://wokwi.com/ci/install.sh | sh' ,
11
+ } ;
12
+
13
+ mkdirSync ( 'dist/bin' , { recursive : true } ) ;
14
+ writeFileSync (
15
+ 'dist/bin/version.json' ,
16
+ JSON . stringify (
17
+ {
18
+ version,
19
+ sha,
20
+ install : installCommands ,
21
+ } ,
22
+ null ,
23
+ 2 ,
24
+ ) ,
25
+ ) ;
26
+
8
27
const options = {
9
28
platform : 'node' ,
10
29
entryPoints : [ './src/main.ts' ] ,
You can’t perform that action at this time.
0 commit comments