From ada4ab46ca546786c0e57c2577a2cebf8b261d03 Mon Sep 17 00:00:00 2001 From: Yuuto <55290516+JustYuuto@users.noreply.github.com> Date: Sat, 23 Nov 2024 04:45:31 +0100 Subject: [PATCH] build --- .github/workflows/build.yml | 7 +++++++ bin/build.js | 15 +++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c17f6ad..2a8e3c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,24 +29,28 @@ jobs: with: path: dist/*.snap name: ${{ runner.os }}-snap + if-no-files-found: error - name: Upload .deb file uses: actions/upload-artifact@v4 with: path: dist/*.deb name: ${{ runner.os }}-deb + if-no-files-found: error - name: Upload .AppImage file uses: actions/upload-artifact@v4 with: path: dist/*.AppImage name: ${{ runner.os }}-AppImage + if-no-files-found: error - name: Upload .rpm file uses: actions/upload-artifact@v4 with: path: dist/*.rpm name: ${{ runner.os }}-rpm + if-no-files-found: error build-windows: runs-on: windows-latest @@ -70,6 +74,8 @@ jobs: with: path: dist/*.exe name: ${{ runner.os }}-exe + if-no-files-found: error + build-macos: runs-on: macos-latest @@ -93,3 +99,4 @@ jobs: with: path: dist/*.dmg name: ${{ runner.os }}-dmg + if-no-files-found: error diff --git a/bin/build.js b/bin/build.js index b15b7a7..f485635 100644 --- a/bin/build.js +++ b/bin/build.js @@ -36,12 +36,6 @@ const config = { ] }; -const options = { - config, - win: ['nsis'], - x64: true, - publish: 'never', -}; const specifiedOS = process.argv[2]; if (specifiedOS) { if (specifiedOS === 'windows') { @@ -55,11 +49,12 @@ if (specifiedOS) { config.win = undefined; } } else { - if (process.platform === 'darwin') options.mac = config.mac.target; - // Linux programs like chmod are not supported on Windows - if (process.platform !== 'win32') options.linux = config.linux.target; + if (process.platform === 'win32') { + config.mac = undefined; + config.linux = undefined; + } } -builder.build(options).then(() => { +builder.build({ config }).then(() => { console.log('\nSetup built in the "dist" folder.'); });