Skip to content

Commit

Permalink
feat: 打包时带上shell文件
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Mar 26, 2024
1 parent 71b20a3 commit fc38e9a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,18 @@ jobs:
- run: npm ci
## linux & macos
- run: npm run build
- run: cp $(which node) .
- run: |
cp $(which node) .
cp platforms/linux/run.sh .
tar -caf ${{ matrix.artifact_name }} dist nginx package.json node_modules node run.sh
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
## windows
- run: tar -caf ${{ matrix.artifact_name }} dist nginx package.json node_modules node
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- run: |
$SRC = (Get-Command node.exe).Path
copy $SRC node.exe
tar -caf ${{ matrix.artifact_name }} dist package.json node_modules node.exe
copy platforms/windows/run.ps1 .
tar -caf ${{ matrix.artifact_name }} dist package.json node_modules node.exe run.ps1
if: matrix.os == 'windows-latest'
- name: Upload binaries to release
Expand Down
3 changes: 3 additions & 0 deletions platforms/linux/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

./node dist/index.js
2 changes: 2 additions & 0 deletions platforms/windows/run.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./node.exe dist/index.js
pause

0 comments on commit fc38e9a

Please sign in to comment.