Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
DO_NOT_TRACK: "1"
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
ELECTRON_HEADERS_CACHE: ${{ github.workspace }}/.cache/electron-headers
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/playwright
TURBOREPO_CACHE: ${{ github.workspace }}/.turbo

Expand Down Expand Up @@ -114,6 +115,13 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ matrix.arch }}-electron-builder-

- name: Use Electron headers cache
id: electron-headers
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_HEADERS_CACHE }}
key: electron-headers-${{ env.electron_version }}

- name: Use Playwright cache
id: playwright-cache
uses: actions/cache@v4
Expand Down Expand Up @@ -159,6 +167,14 @@ jobs:
if: runner.os == 'windows'
run: echo "HOME=$HOME" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Install Electron headers
if: steps.electron-headers.outputs.cache-hit != 'true'
shell: bash
run: |
set -eo pipefail
mkdir -p $ELECTRON_HEADERS_CACHE
curl -sSfL https://www.electronjs.org/headers/v$electron_version/node-v$electron_version-headers.tar.gz -o $ELECTRON_HEADERS_CACHE/node-v$electron_version-headers.tar.gz

- name: Install Playwright with dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpx playwright install --with-deps
Expand All @@ -179,6 +195,8 @@ jobs:

- name: Rebuild native packages for Electron
run: pnpm --color=always electron-rebuild -a ${{ matrix.arch }}
env:
npm_package_config_node_gyp_tarball: ${{ env.ELECTRON_HEADERS_CACHE }}/node-v${{ env.electron_version }}-headers.tar.gz

- name: Build extra resources
id: build-resources
Expand All @@ -196,7 +214,7 @@ jobs:
run: pnpm --color=always build:resources

- name: Build Electron app
run: pnpm --color=always build:app:dir -- --${{ matrix.arch }}
run: pnpm --color=always build:app:dir --${{ matrix.arch }}

- name: Run integration tests (Linux)
id: integration-tests-linux
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
DO_NOT_TRACK: "1"
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
ELECTRON_HEADERS_CACHE: ${{ github.workspace }}/.cache/electron-headers

steps:
- name: Checkout
Expand Down Expand Up @@ -152,6 +153,13 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ matrix.arch }}-electron-builder-

- name: Use Electron headers cache
id: electron-headers
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_HEADERS_CACHE }}
key: electron-headers-${{ env.electron_version }}

- name: Install pnpm dependencies
id: install-pnpm
shell: bash
Expand All @@ -163,6 +171,14 @@ jobs:
shell: bash
run: pnpm install --color=always --prefer-offline --frozen-lockfile

- name: Install Electron headers
if: steps.electron-headers.outputs.cache-hit != 'true'
shell: bash
run: |
set -eo pipefail
mkdir -p $ELECTRON_HEADERS_CACHE
curl -sSfL https://www.electronjs.org/headers/v$electron_version/node-v$electron_version-headers.tar.gz -o $ELECTRON_HEADERS_CACHE/node-v$electron_version-headers.tar.gz

- name: Enable downloading for all architectures (macOS x64, Linux arm64, Windows arm64)
if: runner.os == 'macOS' && matrix.arch == 'x64' || runner.os == 'Linux' && matrix.arch == 'arm64' || runner.os == 'Windows' && matrix.arch == 'arm64'
shell: bash
Expand All @@ -183,6 +199,7 @@ jobs:
env:
npm_config_arch: ${{ matrix.arch }}
npm_config_target_arch: ${{ matrix.arch }}
npm_package_config_node_gyp_tarball: ${{ env.ELECTRON_HEADERS_CACHE }}/node-v${{ env.electron_version }}-headers.tar.gz

- name: Build extra resources
id: build-resources
Expand All @@ -205,7 +222,7 @@ jobs:
for var in APPLEID APPLEIDPASS APPLETEAMID CSC_LINK CSC_KEY_PASSWORD CSC_INSTALLER_LINK CSC_INSTALLER_KEY_PASSWORD; do
test -n "${!var}" || unset $var
done
pnpm --color=always build:app -- \
pnpm --color=always build:app \
dmg pkg \
--${{ matrix.arch }}
env:
Expand Down Expand Up @@ -283,15 +300,15 @@ jobs:
- name: Build Electron app (Linux)
if: runner.os == 'Linux'
run: |
pnpm --color=always build:app -- \
pnpm --color=always build:app \
AppImage deb rpm \
--${{ matrix.arch }}

- name: Build Electron app (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
pnpm --color=always build:app -- \
pnpm --color=always build:app \
msi nsis \
--${{ matrix.arch }}

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"biome:check": "corepack pnpm biome check",
"biome:fix": "corepack pnpm biome check --fix",
"biome:migrate": "corepack pnpm biome migrate --write",
"build": "turbo run build",
"build:app": "turbo run build:app",
"build:app:dir": "corepack pnpm build:app -- dir",
"build": "turbo run build --",
"build:app": "turbo run build:app --",
"build:app:dir": "corepack pnpm build:app dir",
"build:core": "cd packages/core && corepack pnpm build",
"build:dev": "NODE_ENV=development turbo run build:dev",
"build:dev": "NODE_ENV=development turbo run build:dev --",
"build:freelens": "cd freelens && corepack pnpm build",
"build:resources": "turbo run build:resources",
"build:resources": "turbo run build:resources --",
"clean": "corepack pnpm -r clean",
"clean:node_modules": "corepack pnpm -r clean:node_modules && corepack pnpm dlx [email protected] node_modules",
"dev": "turbo run dev --parallel",
"dev": "turbo run dev --parallel --",
"electron-rebuild": "cd freelens && corepack pnpm electron-rebuild",
"start": "cd freelens && corepack pnpm start",
"start:os": "corepack pnpm dlx [email protected] --",
Expand Down
10 changes: 9 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
"CSC_LINK",
"CSC_KEY_PASSWORD",
"CSC_INSTALLER_LINK",
"CSC_INSTALLER_KEY_PASSWORD"
"CSC_INSTALLER_KEY_PASSWORD",
"COREPACK_*",
"LOCALAPPDATA",
"DOWNLOAD_ALL_ARCHITECTURES",
"NVM_*",
"PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD",
"PNPM_*",
"npm_config_*",
"npm_package_config_node_gyp_*"
],
"tasks": {
"build": {
Expand Down
Loading