Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
JustYuuto committed Nov 23, 2024
1 parent 0faf9ff commit ada4ab4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -70,6 +74,8 @@ jobs:
with:
path: dist/*.exe
name: ${{ runner.os }}-exe
if-no-files-found: error


build-macos:
runs-on: macos-latest
Expand All @@ -93,3 +99,4 @@ jobs:
with:
path: dist/*.dmg
name: ${{ runner.os }}-dmg
if-no-files-found: error
15 changes: 5 additions & 10 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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.');
});

0 comments on commit ada4ab4

Please sign in to comment.