Skip to content
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

Fix electron builds #2745

Merged
merged 13 commits into from
Dec 30, 2024
11 changes: 8 additions & 3 deletions .github/workflows/_publish-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,17 @@ jobs:
if: startsWith(matrix.os, 'macos')
with:
xcode-version: latest-stable
# Update .npmrc file to support electron builder
# https://www.electron.build/#note-for-pnpm
- run: echo -e "\nnode-linker = hoisted" >> .npmrc
- run: pnpm i --frozen-lockfile
- uses: nick-invision/retry@v2
with:
timeout_minutes: 20
max_attempts: 3
command: pnpm build:ci
# Create deploy ready source files for electron
- run: pnpm deploy --filter=altair out/elx-files
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -95,7 +100,7 @@ jobs:
uses: paneron/action-electron-builder@v1.8.1
with:
github_token: ${{ secrets.github_token }}
package_root: packages/altair-electron/
package_root: out/elx-files/
skip_build: true
skip_package_manager_install: true
mac_certs: ${{ secrets.mac_certs }}
Expand Down Expand Up @@ -162,7 +167,7 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: ${{ inputs.publish && 'production' || '' }}
sourcemaps: packages/altair-electron/dist/
sourcemaps: out/elx-files/dist/
version: ${{ inputs.publish && steps.getversion.outputs.version || '' }}
url_prefix: 'app:///dist'

Expand All @@ -171,4 +176,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: electron-builds-${{ matrix.os }}
path: packages/altair-electron/out/**
path: out/elx-files/out/**
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
prefer-workspace-packages = true
fetch-timeout = 1000000
git-tag-version = false
node-linker = hoisted
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "altair",
"name": "altair-repo",
"description": "The best graphQL client you will ever need",
"version": "8.1.1",
"author": "Samuel Imolorhe <altair@sirmuel.design> (https://sirmuel.design/)",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"babel-preset-react": "6.24.1",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"electron": "^27.1.0",
"electron": "^33.2.1",
"eslint": "^8.57.0",
"eslint-config-altair": "workspace:*",
"eslint-config-prettier": "^9.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-electron-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"devDependencies": {
"@types/node": "^22.7.4",
"electron": "^27.1.0",
"electron": "^33.2.1",
"typescript": "5.2.2"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-electron-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@typescript-eslint/parser": "^6.19.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"electron": "^27.1.0",
"electron": "^33.2.1",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
Expand Down
1 change: 1 addition & 0 deletions packages/altair-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"compile": "tsc && pnpm sentry:sourcemaps:inject",
"dev": "pnpm compile && electron ./dist/",
"bootstrap": "pnpm compile",
"postinstall": "electron-builder install-app-deps",
"test": "pnpm test:unit",
"test:e2e": "([[ -n $RUNNER_OS ]] && [[ $RUNNER_OS != 'Linux' ]]) && exit 0 || playwright test e2e",
"test:e2e:old": "jest -c jest.config.e2e.js --runInBand",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-electron/src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class ElectronApp {
/**
* @type Electron.Config
*/
const proxyConfig: Electron.Config = {
const proxyConfig: Electron.ProxyConfig = {
mode: 'direct',
};

Expand Down
128 changes: 52 additions & 76 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Loading