update workflows for new build

This commit is contained in:
jeffvli 2025-05-22 23:03:08 -07:00
parent faadff0211
commit 0d42a6ea49
13 changed files with 66 additions and 94 deletions

View file

@ -14,17 +14,15 @@ jobs:
- name: Checkout git repo - name: Checkout git repo
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Install Node and NPM - name: Install Node and PNPM
uses: actions/setup-node@v1 uses: pnpm/action-setup@v4
with: with:
node-version: 18 version: 9
cache: npm
- name: Install dependencies - name: Install dependencies
run: | run: pnpm install
npm install --legacy-peer-deps
- name: Publish releases - name: Build and Publish releases
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: nick-invision/retry@v2.8.2 uses: nick-invision/retry@v2.8.2
@ -33,12 +31,11 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run postinstall pnpm run package:linux
npm run build pnpm run publish:linux
npm exec electron-builder -- --publish always --linux on_retry_command: pnpm cache delete
on_retry_command: npm cache clean --force
- name: Publish releases (arm64) - name: Build and Publish releases (arm64)
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: nick-invision/retry@v2.8.2 uses: nick-invision/retry@v2.8.2
@ -47,7 +44,6 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run postinstall pnpm run package:linux-arm64
npm run build pnpm run publish:linux-arm64
npm exec electron-builder -- --publish always --arm64 on_retry_command: pnpm cache delete
on_retry_command: npm cache clean --force

View file

@ -14,17 +14,15 @@ jobs:
- name: Checkout git repo - name: Checkout git repo
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Install Node and NPM - name: Install Node and PNPM
uses: actions/setup-node@v1 uses: pnpm/action-setup@v4
with: with:
node-version: 18 version: 9
cache: npm
- name: Install dependencies - name: Install dependencies
run: | run: pnpm install
npm install --legacy-peer-deps
- name: Publish releases - name: Build and Publish releases
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: nick-invision/retry@v2.8.2 uses: nick-invision/retry@v2.8.2
@ -33,7 +31,6 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run postinstall pnpm run package:mac
npm run build pnpm run publish:mac
npm exec electron-builder -- --publish always --mac on_retry_command: pnpm cache delete
on_retry_command: npm cache clean --force

View file

@ -17,15 +17,13 @@ jobs:
- name: Checkout git repo - name: Checkout git repo
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Node and NPM - name: Install Node and PNPM
uses: actions/setup-node@v3 uses: pnpm/action-setup@v4
with: with:
node-version: 18 version: 9
cache: npm
- name: Install dependencies - name: Install dependencies
run: | run: pnpm install
npm install --legacy-peer-deps
- name: Build for Windows - name: Build for Windows
if: ${{ matrix.os == 'windows-latest' }} if: ${{ matrix.os == 'windows-latest' }}
@ -35,7 +33,7 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run package:pr:windows pnpm run package:win:pr
- name: Build for Linux - name: Build for Linux
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
@ -45,7 +43,7 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run package:pr:linux pnpm run package:linux:pr
- name: Build for MacOS - name: Build for MacOS
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
@ -55,41 +53,41 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run package:pr:macos pnpm run package:mac:pr
- name: Zip Windows Binaries - name: Zip Windows Binaries
if: ${{ matrix.os == 'windows-latest' }} if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh shell: pwsh
run: | run: |
Compress-Archive -Path "release/build/*.exe" -DestinationPath "release/build/windows-binaries.zip" -Force Compress-Archive -Path "dist/*.exe" -DestinationPath "dist/windows-binaries.zip" -Force
- name: Zip Linux Binaries - name: Zip Linux Binaries
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
run: | run: |
zip -r release/build/linux-binaries.zip release/build/*.{AppImage,deb,rpm} zip -r dist/linux-binaries.zip dist/*.{AppImage,deb,rpm}
- name: Zip MacOS Binaries - name: Zip MacOS Binaries
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
run: | run: |
zip -r release/build/macos-binaries.zip release/build/*.dmg zip -r dist/macos-binaries.zip dist/*.dmg
- name: Upload Windows Binaries - name: Upload Windows Binaries
if: ${{ matrix.os == 'windows-latest' }} if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: windows-binaries name: windows-binaries
path: release/build/windows-binaries.zip path: dist/windows-binaries.zip
- name: Upload Linux Binaries - name: Upload Linux Binaries
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: linux-binaries name: linux-binaries
path: release/build/linux-binaries.zip path: dist/linux-binaries.zip
- name: Upload MacOS Binaries - name: Upload MacOS Binaries
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: macos-binaries name: macos-binaries
path: release/build/macos-binaries.zip path: dist/macos-binaries.zip

View file

@ -14,17 +14,15 @@ jobs:
- name: Checkout git repo - name: Checkout git repo
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Install Node and NPM - name: Install Node and PNPM
uses: actions/setup-node@v1 uses: pnpm/action-setup@v4
with: with:
node-version: 18 version: 9
cache: npm
- name: Install dependencies - name: Install dependencies
run: | run: pnpm install
npm install --legacy-peer-deps
- name: Publish releases - name: Build and Publish releases
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: nick-invision/retry@v2.8.2 uses: nick-invision/retry@v2.8.2
@ -33,7 +31,6 @@ jobs:
max_attempts: 3 max_attempts: 3
retry_on: error retry_on: error
command: | command: |
npm run postinstall pnpm run package:win
npm run build pnpm run publish:win
npm exec electron-builder -- --publish always --win on_retry_command: pnpm cache delete
on_retry_command: npm cache clean --force

View file

@ -14,21 +14,13 @@ jobs:
- name: Check out Git repository - name: Check out Git repository
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Install Node.js and NPM - name: Install Node.js and PNPM
uses: actions/setup-node@v2 uses: pnpm/action-setup@v4
with: with:
node-version: 16 version: 9
cache: npm
- name: npm install - name: Install dependencies
run: | run: pnpm install
npm install --legacy-peer-deps
- name: npm test - name: Lint Files
env: run: pnpm run lint
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run lint
npm run package
npm exec tsc
npm test

View file

@ -2,9 +2,11 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/> <true/>
<key>com.apple.security.cs.allow-jit</key> <key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/> <true/>
</dict> </dict>
</plist> </plist>

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View file

@ -3,7 +3,7 @@ productName: Feishin
artifactName: ${productName}-${version}-${os}-setup.${ext} artifactName: ${productName}-${version}-${os}-setup.${ext}
electronVersion: 35.1.5 electronVersion: 35.1.5
directories: directories:
buildResources: build buildResources: assets
files: files:
- '!**/.vscode/*' - '!**/.vscode/*'
- '!src/*' - '!src/*'
@ -33,8 +33,8 @@ mac:
icon: assets/icons/icon.icns icon: assets/icons/icon.icns
type: distribution type: distribution
hardenedRuntime: true hardenedRuntime: true
entitlements: build/entitlements.mac.plist entitlements: assets/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist entitlementsInherit: assets/entitlements.mac.plist
gatekeeperAssess: false gatekeeperAssess: false
notarize: false notarize: false
dmg: dmg:

View file

@ -9,7 +9,6 @@ const currentOSEnv = process.platform;
const config: UserConfig = { const config: UserConfig = {
main: { main: {
build: { build: {
outDir: './release/app/dist/main',
rollupOptions: { rollupOptions: {
external: ['source-map-support'], external: ['source-map-support'],
}, },
@ -35,9 +34,6 @@ const config: UserConfig = {
}, },
}, },
preload: { preload: {
build: {
outDir: './release/app/dist/preload',
},
plugins: [externalizeDepsPlugin()], plugins: [externalizeDepsPlugin()],
resolve: { resolve: {
alias: { alias: {
@ -47,9 +43,6 @@ const config: UserConfig = {
}, },
}, },
renderer: { renderer: {
build: {
outDir: './release/app/dist/web',
},
css: { css: {
modules: { modules: {
generateScopedName: '[name]__[local]__[hash:base64:5]', generateScopedName: '[name]__[local]__[hash:base64:5]',

View file

@ -18,7 +18,7 @@
"name": "jeffvli", "name": "jeffvli",
"url": "https://github.com/jeffvli/" "url": "https://github.com/jeffvli/"
}, },
"main": "./release/app/dist/main/index.js", "main": "./out/main/index.js",
"scripts": { "scripts": {
"build": "pnpm run typecheck && electron-vite build", "build": "pnpm run typecheck && electron-vite build",
"dev": "electron-vite dev", "dev": "electron-vite dev",
@ -27,11 +27,20 @@
"i18next": "i18next -c src/i18n/i18next-parser.config.js", "i18next": "i18next -c src/i18n/i18next-parser.config.js",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"lint": "eslint --cache --fix .", "lint": "eslint --cache --fix .",
"lint:fix": "eslint --cache --fix .",
"package": "pnpm run build && electron-builder", "package": "pnpm run build && electron-builder",
"package:dev": "pnpm run build && electron-builder --dir", "package:dev": "pnpm run build && electron-builder --dir",
"package:linux": "electron-vite build && electron-builder --linux", "package:linux": "pnpm run build && electron-builder --linux",
"package:mac": "electron-vite build && electron-builder --mac", "package:linux-arm64:pr": "pnpm run build && electron-builder --linux --arm64 --publish never",
"package:linux:pr": "pnpm run build && electron-builder --linux --publish never",
"package:mac": "pnpm run build && electron-builder --mac",
"package:mac:pr": "pnpm run build && electron-builder --mac --publish never",
"package:win": "pnpm run build && electron-builder --win", "package:win": "pnpm run build && electron-builder --win",
"package:win:pr": "pnpm run build && electron-builder --win --publish never",
"publish:linux": "electron-builder --publish always --linux",
"publish:linux-arm64": "electron-builder --publish always --linux --arm64",
"publish:mac": "electron-builder --publish always --mac",
"publish:win": "electron-builder --publish always --win",
"start": "electron-vite preview", "start": "electron-vite preview",
"typecheck": "pnpm run typecheck:node && pnpm run typecheck:web", "typecheck": "pnpm run typecheck:node && pnpm run typecheck:web",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", "typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",