Skip to content

Commit 9677075

Browse files
buxukulinxiaodong
andauthored
feat: build release (#7)
Co-authored-by: linxiaodong <[email protected]>
1 parent 60442e3 commit 9677075

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build/release
2+
3+
on: push
4+
5+
jobs:
6+
release:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [macos-latest, ubuntu-latest, windows-latest]
12+
13+
steps:
14+
- name: Check out Git repository
15+
uses: actions/checkout@v1
16+
17+
- name: Install Node.js, NPM and Yarn
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: 20
21+
22+
- name: Build/release Electron app
23+
uses: samuelmeuli/action-electron-builder@v1
24+
with:
25+
# GitHub token, automatically provided to the action
26+
# (No need to define this secret in the repo settings)
27+
github_token: ${{ secrets.TOKEN }}
28+
29+
# If the commit is tagged with a version (e.g. "v1.0.0"),
30+
# release the app after building
31+
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

main/helpers/ffmpeg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const extractAudio = (videoPath, audioPath) => {
2020
console.log('转换任务开始~', str);
2121
})
2222
.on('progress', function (progress) {
23-
console.log('进行中,完成' + progress.percent + '%');
23+
console.log('进行中,完成' + (progress.percent || 0) + '%');
2424
})
2525
.on('end', function (str) {
2626
console.log('转换任务完成!');

0 commit comments

Comments
 (0)