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 42fb5fb commit 3b5274a
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 4 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Upload .snap file
uses: actions/upload-artifact@v4
with:
path: dist/*.snap

- name: Upload .deb file
uses: actions/upload-artifact@v4
with:
path: dist/*.deb

- name: Upload .AppImage file
uses: actions/upload-artifact@v4
with:
path: dist/*.AppImage

- name: Upload .rpm file
uses: actions/upload-artifact@v4
with:
path: dist/*.rpm

build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Upload .exe file
uses: actions/upload-artifact@v4
with:
path: dist/*.exe

build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Upload .dmg file
uses: actions/upload-artifact@v4
with:
path: dist/*.dmg
8 changes: 4 additions & 4 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const config = {
},
linux: {
category: 'Audio;AudioVideo',
target: ['snap', 'deb', 'AppImage'],
icon: join(__dirname, '..', 'src', 'img', 'app.icns'),
target: ['snap', 'deb', 'AppImage', 'rpm'],
icon: join(__dirname, '..', 'src', 'img', 'app.png'),

This comment has been minimized.

Copy link
@Zalk0

Zalk0 Nov 23, 2024

Contributor

Why did you put back the png icon, did it not work with the macos icon format?
The icon is not displaying in my app menu after installing the deb package...
At least the category works now

This comment has been minimized.

Copy link
@JustYuuto

JustYuuto Nov 23, 2024

Author Owner

Well I'm sorry, but it wouldn't build with the icns file on my mac :/ I'll try to see how I can fix it

This comment has been minimized.

Copy link
@Zalk0

Zalk0 Nov 23, 2024

Contributor

Okay, well it should work I've been doing it on a project and it works. That's also the workaround for the issue with png I heard. Maybe it's incompatible with either snap or rpm format as I don't build for them. Maybe you could try overriding the icon only for the deb format.
I don't think there's an issue in using the png for AppImage and don't know enough about the other 2 formats.

},
files: [
'!src/*',
Expand All @@ -42,9 +42,9 @@ const options = {
x64: true,
publish: 'never',
};
if (process.platform === 'darwin') options.mac = ['dmg'];
if (process.platform === 'darwin') options.mac = config.mac.target;
// Linux programs like chmod are not supported on Windows
if (process.platform !== 'win32') options.linux = ['snap', 'deb', 'AppImage'];
if (process.platform !== 'win32') options.linux = config.linux.target;

builder.build(options).then(() => {
console.log('\nSetup built in the "dist" folder.');
Expand Down

0 comments on commit 3b5274a

Please sign in to comment.