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 88 create-release :
99 runs-on : ubuntu-latest
1010 steps :
11- - uses : actions/checkout@v3
11+ - uses : actions/checkout@v4
1212 - name : ' Install NPM dependencies'
1313 run : npm ci
1414 - name : ' Install LDID'
2424 - name : Upload Release
2525 uses : ncipollo/release-action@v1
2626 with :
27- artifacts : ' dist/bin/wokwi-cli-*'
27+ artifacts : ' dist/bin/wokwi-cli-*,dist/bin/version.json '
2828 token : ${{ secrets.GITHUB_TOKEN }}
2929 generateReleaseNotes : true
Original file line number Diff line number Diff line change 11import { execSync } from 'child_process' ;
22import { build } from 'esbuild' ;
3- import { readFileSync } from 'fs' ;
3+ import { mkdirSync , readFileSync , writeFileSync } from 'fs' ;
44
55const { version } = JSON . parse ( readFileSync ( 'package.json' , 'utf8' ) ) ;
66const sha = execSync ( 'git rev-parse --short=12 HEAD' ) . toString ( ) . trim ( ) ;
77
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+
827const options = {
928 platform : 'node' ,
1029 entryPoints : [ './src/main.ts' ] ,
You can’t perform that action at this time.
0 commit comments