Skip to content

Commit 0c6fc4a

Browse files
committed
Auto-rename windows binary before uploading
1 parent 49bb1ec commit 0c6fc4a

File tree

4 files changed

+327
-109
lines changed

4 files changed

+327
-109
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import glob from 'glob';
2+
import fs from 'fs';
3+
4+
glob('release/build/*.exe', (err, files) => {
5+
if (err) {
6+
console.error(err);
7+
process.exit(1);
8+
}
9+
files.forEach((path) => {
10+
const newPath = path.replaceAll(' ', '.');
11+
fs.renameSync(path, newPath);
12+
});
13+
});

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
verbose: true
4141
draft: false
4242

43+
- name: Upload release
44+
if: ${{ matrix.os == 'windows-latest' }}
45+
run: npm run rename-windows-binary
46+
4347
- name: Upload release
4448
if: ${{ matrix.os == 'windows-latest' }}
4549
uses: xresloader/upload-to-github-release@master

0 commit comments

Comments
 (0)