Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRafia committed Mar 15, 2024
1 parent 10ccf30 commit f545400
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 106 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: Build
on: [push, pull_request]
# name: Build
# on: [push, pull_request]

jobs:
build_on_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 18
- name: install dependencies
run: npm install
- name: build
run: npm run make
# jobs:
# build_on_linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@master
# with:
# node-version: 18
# - name: install dependencies
# run: npm install
# - name: build
# run: npm run make

# build_on_mac:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2s
# - uses: actions/setup-node@master
# with:
# node-version: 18
# - name: install dependencies
# run: npm install
# - name: build
# run: npm run make
# # build_on_mac:
# # runs-on: macos-latest
# # steps:
# # - uses: actions/checkout@v2s
# # - uses: actions/setup-node@master
# # with:
# # node-version: 18
# # - name: install dependencies
# # run: npm install
# # - name: build
# # run: npm run make

build_on_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 18
- name: install dependencies
run: npm install
- name: build
run: npm run make
# build_on_win:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@master
# with:
# node-version: 18
# - name: install dependencies
# run: npm install
# - name: build
# run: npm run make
69 changes: 23 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,26 @@
name: Release
name: Release app
on:
release:
types:
- created

workflow_dispatch:
jobs:

publish_on_linux:
runs-on: ubuntu-latest
build:
strategy:
matrix:
os:
[
{ name: 'linux', image: 'ubuntu-latest' },
{ name: 'windows', image: 'windows-latest' },
# { name: 'macos', image: 'macos-latest' },
]
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 18
- name: install dependencies
run: npm install
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run publish

# publish_on_mac:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@master
# with:
# node-version: 18
# - name: install dependencies
# run: npm install
# - name: publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: npm run publish

publish_on_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 18
- name: install dependencies
run: npm install
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run publish
- name: Github checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Publish app
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: npm run publish
72 changes: 49 additions & 23 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,62 @@ import { MakerZIP } from '@electron-forge/maker-zip';
import { MakerDeb } from '@electron-forge/maker-deb';
import { MakerRpm } from '@electron-forge/maker-rpm';
import { VitePlugin } from '@electron-forge/plugin-vite';
import path from 'path';

const config: ForgeConfig = {
packagerConfig: {
icon: "src/assets/icon"
asar: true,
icon: path.join(process.cwd(), 'main', 'build', 'icon'),
},
rebuildConfig: {},
makers: [new MakerSquirrel({}), new MakerZIP({}, ['darwin']), new MakerRpm({}), new MakerDeb({})],
plugins: [
new VitePlugin({
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
// If you are familiar with Vite configuration, it will look really familiar.
build: [
{
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
entry: 'src/main.ts',
config: 'vite.main.config.ts',
},
{
entry: 'src/preload.ts',
config: 'vite.preload.config.ts',
},
],
renderer: [
{
name: 'main_window',
config: 'vite.renderer.config.ts',
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
bin: 'Speedy'
}
},
{
name: '@electron-forge/maker-dmg',
config: {
bin: 'Speedy'
},
},
{
name: '@electron-forge/maker-deb',
config: {
bin: 'Speedy',
options: {
icon: path.join(process.cwd(), 'main', 'build', 'icon.png'),
},
],
}),
}
},
{
name: '@electron-forge/maker-rpm',
config: {
bin: 'Speedy',
icon: path.join(process.cwd(), 'main', 'build', 'icon.png'),
}
}
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {}
}
],
publishers: [
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'RezaRafia',
name: 'Speedy'
},
prerelease: true
}
}
]
};

export default config;
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const createWindow = () => {
}

// Open the DevTools.
mainWindow.webContents.openDevTools();
// mainWindow.webContents.openDevTools();
};

// This method will be called when Electron has finished
Expand Down

0 comments on commit f545400

Please sign in to comment.