-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Linux Mint add .deb and resolve mac #4407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 37 commits
ad09e0e
251089f
cc560e8
c431a42
2e70aa6
05420b6
89bc69c
221e3d1
d4813c4
fcdd177
775e756
20fb0ab
7f4d736
a9efc89
50b33fd
ae3833b
dce5cd0
8323c25
8bd517f
78a4ca9
aa37132
a7d9ad1
327b6c4
c311928
d954004
8962383
5806548
b05353a
8409a9a
b5e055c
722fb34
14fb3fc
b22ae8d
99eb27d
07638c3
0e65dba
8cc256a
dd37dda
84f08a5
4490bd0
2815f47
644c0f1
575df2a
0183760
5a6f573
6984265
5d7bedd
eebe673
4df7bc2
70341c1
8b57847
ad7d18e
000eb07
01d5721
8871940
93c6645
70eebb1
2ebee64
b07ef85
6a9b8d4
5005c6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Build After macOS Artifacts | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Build Pear Desktop macOS"] | ||
| types: | ||
| - completed | ||
|
|
||
| permissions: {} | ||
|
|
||
| env: | ||
| NODE_VERSION: "22.x" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build macOS Artifacts | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| runs-on: macos-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | ||
| with: | ||
| version: 10 | ||
| run_install: false | ||
|
|
||
| - name: Setup NodeJS for macOS | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --no-frozen-lockfile | ||
|
|
||
| - name: Build on macOS | ||
| run: | | ||
| pnpm dist:mac | ||
| pnpm dist:mac:arm64 | ||
|
|
||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f | ||
| with: | ||
| name: build-artifacts-macos | ||
| path: pack/ | ||
| retention-days: 7 | ||
| if-no-files-found: error | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,114 @@ | ||||||||||||||||||||||||||||||
| name: Build After Pear Desktop Artifacts | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||
| workflow_run: | ||||||||||||||||||||||||||||||
| workflows: ["Build Pear Desktop"] | ||||||||||||||||||||||||||||||
| types: | ||||||||||||||||||||||||||||||
| - completed | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| permissions: {} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||
| NODE_VERSION: "22.x" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||
| name: Build ${{ matrix.os }} | ||||||||||||||||||||||||||||||
| if: github.event.workflow_run.conclusion == 'success' | ||||||||||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||
| os: [ubuntu-latest, windows-latest] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install pnpm | ||||||||||||||||||||||||||||||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| version: 10 | ||||||||||||||||||||||||||||||
| run_install: false | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Setup NodeJS | ||||||||||||||||||||||||||||||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||||||||||||||||||||||||||
| cache: 'pnpm' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||
| run: pnpm install --no-frozen-lockfile | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install Linux dependencies | ||||||||||||||||||||||||||||||
| if: matrix.os == 'ubuntu-latest' | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| sudo snap install snapcraft --classic | ||||||||||||||||||||||||||||||
| sudo apt update | ||||||||||||||||||||||||||||||
| sudo apt install -y flatpak flatpak-builder | ||||||||||||||||||||||||||||||
| sudo flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo | ||||||||||||||||||||||||||||||
| sudo flatpak install -y flathub org.freedesktop.Platform/x86_64/24.08 | ||||||||||||||||||||||||||||||
| sudo flatpak install -y flathub org.freedesktop.Sdk/x86_64/24.08 | ||||||||||||||||||||||||||||||
| sudo flatpak install -y flathub org.electronjs.Electron2.BaseApp/x86_64/24.08 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Build on Linux | ||||||||||||||||||||||||||||||
| if: matrix.os == 'ubuntu-latest' | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| pnpm dist:linux | ||||||||||||||||||||||||||||||
| pnpm dist:linux:deb-arm64 | ||||||||||||||||||||||||||||||
| pnpm dist:linux:rpm-arm64 | ||||||||||||||||||||||||||||||
|
Comment on lines
+57
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Sequential dist commands will overwrite each other. Similar to the macOS workflow, running 🐛 Proposed fix: Run builds without intermediate clean - name: Build on Linux
if: matrix.os == 'ubuntu-latest'
run: |
- pnpm dist:linux
- pnpm dist:linux:deb-arm64
- pnpm dist:linux:rpm-arm64
+ pnpm clean
+ pnpm build
+ pnpm electron-builder --linux -p never
+ pnpm electron-builder --linux deb:arm64 -p never
+ pnpm electron-builder --linux rpm:arm64 -p neverThis runs clean and build once, then runs electron-builder multiple times to produce all artifacts. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Build on Windows | ||||||||||||||||||||||||||||||
| if: startsWith(matrix.os, 'windows') | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| pnpm dist:win | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Upload artifacts | ||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| name: build-artifacts-${{ matrix.os }} | ||||||||||||||||||||||||||||||
| path: pack/ | ||||||||||||||||||||||||||||||
| retention-days: 7 | ||||||||||||||||||||||||||||||
| if-no-files-found: error | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| build-mint: | ||||||||||||||||||||||||||||||
| name: Build Linux Mint XFCE | ||||||||||||||||||||||||||||||
| if: github.event.workflow_run.conclusion == 'success' | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install pnpm | ||||||||||||||||||||||||||||||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| version: 10 | ||||||||||||||||||||||||||||||
| run_install: false | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Setup NodeJS | ||||||||||||||||||||||||||||||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||||||||||||||||||||||||||
| cache: 'pnpm' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||
| run: pnpm install --no-frozen-lockfile | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Build specifically for Linux Mint XFCE (deb only) | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| find node_modules -name "app-builder" -exec chmod +x {} + || true | ||||||||||||||||||||||||||||||
| pnpm build | ||||||||||||||||||||||||||||||
| pnpm electron-builder --linux deb:x64 -p never | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Upload artifacts | ||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| name: build-artifacts-linux-mint-xfce | ||||||||||||||||||||||||||||||
| path: pack/ | ||||||||||||||||||||||||||||||
| retention-days: 7 | ||||||||||||||||||||||||||||||
| if-no-files-found: error | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Build Pear Desktop macOS | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| permissions: {} | ||
|
|
||
| env: | ||
| NODE_VERSION: "22.x" | ||
|
|
||
| jobs: | ||
| build: | ||
| permissions: | ||
| contents: write | ||
| if: github.event.pull_request.draft == false | ||
| name: Build Pear Desktop macOS | ||
| runs-on: macos-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
|
|
||
| - name: Setup Xcode version | ||
| run: | | ||
| XCODE_APP=$(ls -d /Applications/Xcode_26*.app 2>/dev/null | sort -r | head -n 1) | ||
| if [ -z "$XCODE_APP" ]; then XCODE_APP=$(ls -d /Applications/Xcode*.app | sort -r | head -n 1); fi | ||
| sudo xcode-select -s "$XCODE_APP/Contents/Developer" | ||
| xcodebuild -version | ||
| actool --version | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | ||
| with: | ||
| version: 10 | ||
| run_install: false | ||
|
|
||
| - name: Setup NodeJS for macOS | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --no-frozen-lockfile | ||
|
|
||
| - name: Vite Build | ||
| if: github.repository != 'pear-devs/pear-desktop' || github.event_name == 'pull_request' | ||
| run: | | ||
| pnpm build | ||
|
|
||
| - name: Build and release on Mac | ||
| if: github.repository == 'pear-devs/pear-desktop' && github.event_name != 'pull_request' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| pnpm release:mac |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ name: Build Pear Desktop | |
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| permissions: {} | ||
|
|
||
|
|
@@ -17,51 +19,43 @@ jobs: | |
| name: Build Pear Desktop | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: true | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ macos-26, ubuntu-latest, windows-latest ] | ||
| os: [ ubuntu-latest, windows-latest ] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
|
|
||
|
|
||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | ||
| with: | ||
| version: 10 | ||
| run_install: false | ||
|
|
||
| - name: Setup NodeJS | ||
| if: startsWith(matrix.os, 'macOS') != true | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Setup NodeJS for macOS | ||
| if: startsWith(matrix.os, 'macOS') | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| run: pnpm install --no-frozen-lockfile | ||
|
|
||
| # Only vite build without release if it is a fork, or it is a pull-request | ||
| - name: Vite Build | ||
| if: github.repository == 'pear-devs/pear-desktop' && github.event_name == 'pull_request' | ||
| if: github.repository != 'pear-devs/pear-desktop' || github.event_name == 'pull_request' | ||
| run: | | ||
| pnpm build | ||
|
|
||
| # Build and release if it's the main repository and is not pull-request | ||
| - name: Build and release on Mac | ||
| if: startsWith(matrix.os, 'macOS') && (github.repository == 'pear-devs/pear-desktop' && github.event_name != 'pull_request') | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| pnpm release:mac | ||
|
|
||
|
|
||
| - name: Build and release on Linux | ||
| if: startsWith(matrix.os, 'ubuntu') && (github.repository == 'pear-devs/pear-desktop' && github.event_name != 'pull_request') | ||
| if: matrix.os == 'ubuntu-latest' && (github.repository == 'pear-devs/pear-desktop' && github.event_name != 'pull_request') | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
|
|
@@ -74,6 +68,12 @@ jobs: | |
| sudo flatpak install -y flathub org.electronjs.Electron2.BaseApp/x86_64/24.08 | ||
| pnpm release:linux | ||
|
|
||
| - name: Build specifically for Linux Mint (deb only) | ||
| if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' | ||
| run: | | ||
| pnpm build | ||
| pnpm electron-builder --linux deb:x64 -p never | ||
|
Comment on lines
+71
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Redundant The "Vite Build" step at line 52 already runs ♻️ Proposed fix to remove redundant build - name: Build specifically for Linux Mint (deb only)
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request'
run: |
- pnpm build
pnpm electron-builder --linux deb:x64 -p never🤖 Prompt for AI Agents |
||
|
|
||
| - name: Build and release on Windows | ||
| if: startsWith(matrix.os, 'windows') && (github.repository == 'pear-devs/pear-desktop' && github.event_name != 'pull_request') | ||
| env: | ||
|
|
@@ -107,19 +107,6 @@ jobs: | |
| version: 10 | ||
| run_install: false | ||
|
|
||
| - name: Setup NodeJS | ||
| if: startsWith(matrix.os, 'macOS') != true | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Setup NodeJS for macOS | ||
| if: startsWith(matrix.os, 'macOS') | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Sequential dist commands will overwrite each other.
Both
pnpm dist:macandpnpm dist:mac:arm64includepnpm cleanwhich deletes thepack/directory. Running them sequentially means the x64 build artifacts will be deleted before the arm64 build starts, resulting in only arm64 artifacts being uploaded.🐛 Proposed fix: Run electron-builder directly without clean
- name: Build on macOS run: | - pnpm dist:mac - pnpm dist:mac:arm64 + pnpm clean + pnpm build + pnpm electron-builder --mac dmg:x64 dmg:arm64 -p neverAlternatively, build both architectures in a single electron-builder invocation to avoid the clean/rebuild cycle.
📝 Committable suggestion
🤖 Prompt for AI Agents