diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index d782bab..56a785f 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -19,6 +19,10 @@ on: env: NOTION_DESKTOP_BASE_URL: https://desktop-release.notion-static.com +concurrency: + cancel-in-progress: true + group: prepare-release + jobs: prepare-source: name: Prepare source @@ -127,6 +131,15 @@ jobs: run: | npm install --package-lock-only --no-package-lock --save \ git://github.com/notion-enhancer/notion-enhancer.git#${NOTION_ENHANCER_COMMIT} + + - name: Install additional packages + working-directory: work/clean-source + shell: bash + env: + GLOB_VERSION: 10.4.1 + run: | + npm install --package-lock-only --no-package-lock --save-dev \ + glob@${GLOB_VERSION} - name: Update lockfile working-directory: work/clean-source @@ -149,7 +162,7 @@ jobs: needs: [prepare-source] runs-on: ${{ matrix.os }} strategy: - fail-fast: true + fail-fast: false matrix: target: [windows, linux, macos] include: diff --git a/forge.config.js b/forge.config.js index cbcda7a..a666d20 100644 --- a/forge.config.js +++ b/forge.config.js @@ -1,5 +1,6 @@ const path = require('node:path') const fs = require('node:fs/promises') +const { glob } = require('glob') const sharedLinuxMakersOptions = { name: 'notion-enhanced', @@ -98,12 +99,24 @@ module.exports = { 'notion-enhancer/scripts/enhance-desktop-app.mjs' ) - const path = options.outputPaths[0] - console.log('Setting notion path:', path) - enhancer.setNotionPath(path) + const appAsarPaths = await glob('**/app.asar', { + cwd: options.outputPaths[0], + absolute: true, + }) + + if (appAsarPaths.length !== 1) { + throw new Error('Expected exactly one app.asar file') + } + + const appResourcesDir = path.dirname(appAsarPaths[0]) + console.log('Setting notion resources path:', appResourcesDir) + console.log('Directory contents:', await fs.readdir(appResourcesDir)) + enhancer.setNotionPath(appResourcesDir) const result = await enhancer.enhanceApp(true) - console.log('Enhancer result:', result) + if (!result) { + throw new Error('Failed to enhance app') + } }, }, }