mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
update workflows for new build
This commit is contained in:
parent
faadff0211
commit
0d42a6ea49
13 changed files with 66 additions and 94 deletions
28
.github/workflows/publish-linux.yml
vendored
28
.github/workflows/publish-linux.yml
vendored
|
|
@ -14,17 +14,15 @@ jobs:
|
|||
- name: Checkout git repo
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Node and NPM
|
||||
uses: actions/setup-node@v1
|
||||
- name: Install Node and PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
version: 9
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install --legacy-peer-deps
|
||||
run: pnpm install
|
||||
|
||||
- name: Publish releases
|
||||
- name: Build and Publish releases
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: nick-invision/retry@v2.8.2
|
||||
|
|
@ -33,12 +31,11 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run postinstall
|
||||
npm run build
|
||||
npm exec electron-builder -- --publish always --linux
|
||||
on_retry_command: npm cache clean --force
|
||||
pnpm run package:linux
|
||||
pnpm run publish:linux
|
||||
on_retry_command: pnpm cache delete
|
||||
|
||||
- name: Publish releases (arm64)
|
||||
- name: Build and Publish releases (arm64)
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: nick-invision/retry@v2.8.2
|
||||
|
|
@ -47,7 +44,6 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run postinstall
|
||||
npm run build
|
||||
npm exec electron-builder -- --publish always --arm64
|
||||
on_retry_command: npm cache clean --force
|
||||
pnpm run package:linux-arm64
|
||||
pnpm run publish:linux-arm64
|
||||
on_retry_command: pnpm cache delete
|
||||
|
|
|
|||
19
.github/workflows/publish-macos.yml
vendored
19
.github/workflows/publish-macos.yml
vendored
|
|
@ -14,17 +14,15 @@ jobs:
|
|||
- name: Checkout git repo
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Node and NPM
|
||||
uses: actions/setup-node@v1
|
||||
- name: Install Node and PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
version: 9
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install --legacy-peer-deps
|
||||
run: pnpm install
|
||||
|
||||
- name: Publish releases
|
||||
- name: Build and Publish releases
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: nick-invision/retry@v2.8.2
|
||||
|
|
@ -33,7 +31,6 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run postinstall
|
||||
npm run build
|
||||
npm exec electron-builder -- --publish always --mac
|
||||
on_retry_command: npm cache clean --force
|
||||
pnpm run package:mac
|
||||
pnpm run publish:mac
|
||||
on_retry_command: pnpm cache delete
|
||||
|
|
|
|||
28
.github/workflows/publish-pr.yml
vendored
28
.github/workflows/publish-pr.yml
vendored
|
|
@ -17,15 +17,13 @@ jobs:
|
|||
- name: Checkout git repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node and NPM
|
||||
uses: actions/setup-node@v3
|
||||
- name: Install Node and PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
version: 9
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install --legacy-peer-deps
|
||||
run: pnpm install
|
||||
|
||||
- name: Build for Windows
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
|
|
@ -35,7 +33,7 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run package:pr:windows
|
||||
pnpm run package:win:pr
|
||||
|
||||
- name: Build for Linux
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
|
|
@ -45,7 +43,7 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run package:pr:linux
|
||||
pnpm run package:linux:pr
|
||||
|
||||
- name: Build for MacOS
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
|
|
@ -55,41 +53,41 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run package:pr:macos
|
||||
pnpm run package:mac:pr
|
||||
|
||||
- name: Zip Windows Binaries
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
shell: pwsh
|
||||
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
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
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
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: |
|
||||
zip -r release/build/macos-binaries.zip release/build/*.dmg
|
||||
zip -r dist/macos-binaries.zip dist/*.dmg
|
||||
|
||||
- name: Upload Windows Binaries
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-binaries
|
||||
path: release/build/windows-binaries.zip
|
||||
path: dist/windows-binaries.zip
|
||||
|
||||
- name: Upload Linux Binaries
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-binaries
|
||||
path: release/build/linux-binaries.zip
|
||||
path: dist/linux-binaries.zip
|
||||
|
||||
- name: Upload MacOS Binaries
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-binaries
|
||||
path: release/build/macos-binaries.zip
|
||||
path: dist/macos-binaries.zip
|
||||
|
|
|
|||
19
.github/workflows/publish-windows.yml
vendored
19
.github/workflows/publish-windows.yml
vendored
|
|
@ -14,17 +14,15 @@ jobs:
|
|||
- name: Checkout git repo
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Node and NPM
|
||||
uses: actions/setup-node@v1
|
||||
- name: Install Node and PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
version: 9
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install --legacy-peer-deps
|
||||
run: pnpm install
|
||||
|
||||
- name: Publish releases
|
||||
- name: Build and Publish releases
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: nick-invision/retry@v2.8.2
|
||||
|
|
@ -33,7 +31,6 @@ jobs:
|
|||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: |
|
||||
npm run postinstall
|
||||
npm run build
|
||||
npm exec electron-builder -- --publish always --win
|
||||
on_retry_command: npm cache clean --force
|
||||
pnpm run package:win
|
||||
pnpm run publish:win
|
||||
on_retry_command: pnpm cache delete
|
||||
|
|
|
|||
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
|
|
@ -14,21 +14,13 @@ jobs:
|
|||
- name: Check out Git repository
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Node.js and NPM
|
||||
uses: actions/setup-node@v2
|
||||
- name: Install Node.js and PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
node-version: 16
|
||||
cache: npm
|
||||
version: 9
|
||||
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install --legacy-peer-deps
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: npm test
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
npm run lint
|
||||
npm run package
|
||||
npm exec tsc
|
||||
npm test
|
||||
- name: Lint Files
|
||||
run: pnpm run lint
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
<!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-jit</key>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
BIN
build/icon.icns
BIN
build/icon.icns
Binary file not shown.
BIN
build/icon.ico
BIN
build/icon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 176 KiB |
BIN
build/icon.png
BIN
build/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB |
|
|
@ -3,7 +3,7 @@ productName: Feishin
|
|||
artifactName: ${productName}-${version}-${os}-setup.${ext}
|
||||
electronVersion: 35.1.5
|
||||
directories:
|
||||
buildResources: build
|
||||
buildResources: assets
|
||||
files:
|
||||
- '!**/.vscode/*'
|
||||
- '!src/*'
|
||||
|
|
@ -33,8 +33,8 @@ mac:
|
|||
icon: assets/icons/icon.icns
|
||||
type: distribution
|
||||
hardenedRuntime: true
|
||||
entitlements: build/entitlements.mac.plist
|
||||
entitlementsInherit: build/entitlements.mac.plist
|
||||
entitlements: assets/entitlements.mac.plist
|
||||
entitlementsInherit: assets/entitlements.mac.plist
|
||||
gatekeeperAssess: false
|
||||
notarize: false
|
||||
dmg:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ const currentOSEnv = process.platform;
|
|||
const config: UserConfig = {
|
||||
main: {
|
||||
build: {
|
||||
outDir: './release/app/dist/main',
|
||||
rollupOptions: {
|
||||
external: ['source-map-support'],
|
||||
},
|
||||
|
|
@ -35,9 +34,6 @@ const config: UserConfig = {
|
|||
},
|
||||
},
|
||||
preload: {
|
||||
build: {
|
||||
outDir: './release/app/dist/preload',
|
||||
},
|
||||
plugins: [externalizeDepsPlugin()],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
|
@ -47,9 +43,6 @@ const config: UserConfig = {
|
|||
},
|
||||
},
|
||||
renderer: {
|
||||
build: {
|
||||
outDir: './release/app/dist/web',
|
||||
},
|
||||
css: {
|
||||
modules: {
|
||||
generateScopedName: '[name]__[local]__[hash:base64:5]',
|
||||
|
|
|
|||
15
package.json
15
package.json
|
|
@ -18,7 +18,7 @@
|
|||
"name": "jeffvli",
|
||||
"url": "https://github.com/jeffvli/"
|
||||
},
|
||||
"main": "./release/app/dist/main/index.js",
|
||||
"main": "./out/main/index.js",
|
||||
"scripts": {
|
||||
"build": "pnpm run typecheck && electron-vite build",
|
||||
"dev": "electron-vite dev",
|
||||
|
|
@ -27,11 +27,20 @@
|
|||
"i18next": "i18next -c src/i18n/i18next-parser.config.js",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"lint": "eslint --cache --fix .",
|
||||
"lint:fix": "eslint --cache --fix .",
|
||||
"package": "pnpm run build && electron-builder",
|
||||
"package:dev": "pnpm run build && electron-builder --dir",
|
||||
"package:linux": "electron-vite build && electron-builder --linux",
|
||||
"package:mac": "electron-vite build && electron-builder --mac",
|
||||
"package:linux": "pnpm run build && electron-builder --linux",
|
||||
"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: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",
|
||||
"typecheck": "pnpm run typecheck:node && pnpm run typecheck:web",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue