diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f704a07e..319f3e6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,8 +5,8 @@ on: pull_request: jobs: - format: - name: Check Formatting + compile: + name: Check & Compile runs-on: ubuntu-latest steps: @@ -18,9 +18,16 @@ jobs: node-version: "18.x" cache: "npm" - name: Install Node.js dependencies - run: npm ci + run: npm ci --ignore-scripts - name: Check formatting run: npm run check-format + - name: Compile bundles + run: npm run compile + - name: Upload bundles + uses: actions/upload-artifact@v3 + with: + name: bundles + path: bundles/*.js build: strategy: @@ -50,6 +57,7 @@ jobs: name: Build for ${{ matrix.platform.displayName }} (${{ matrix.arch }}) runs-on: ${{ matrix.platform.os }} + needs: compile steps: - name: Checkout repository @@ -69,8 +77,13 @@ jobs: run: | echo "CSC_LINK=${{ secrets.MACOS_CERTIFICATE }}" >> $GITHUB_ENV echo "CSC_KEY_PASSWORD=${{ secrets.MACOS_CERTIFICATE_PWD }}" >> $GITHUB_ENV + - name: Download bundles + uses: actions/download-artifact@v3 + with: + name: bundles + path: bundles - name: Build app - run: npm run build -- --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never + run: npx electron-builder build --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never env: NODE_OPTIONS: --max-old-space-size=4096 - name: Prepare macOS artifact diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 676e88f2..5963ccec 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,8 +5,8 @@ on: types: [published] jobs: - format: - name: Check Formatting + compile: + name: Check & Compile runs-on: ubuntu-latest steps: @@ -18,9 +18,16 @@ jobs: node-version: "18.x" cache: "npm" - name: Install Node.js dependencies - run: npm ci + run: npm ci --ignore-scripts - name: Check formatting run: npm run check-format + - name: Compile bundles + run: npm run compile + - name: Upload bundles + uses: actions/upload-artifact@v3 + with: + name: bundles + path: bundles/*.js build: strategy: @@ -80,6 +87,7 @@ jobs: name: Build for ${{ matrix.platform.displayName }} (${{ matrix.arch }}) runs-on: ${{ matrix.platform.os }} + needs: compile steps: - name: Checkout repository @@ -107,8 +115,13 @@ jobs: echo "APPLE_ID=${{ secrets.MACOS_APPLE_ID }}" >> $GITHUB_ENV echo "APPLE_ID_PWD=${{ secrets.MACOS_APPLE_ID_PWD }}" >> $GITHUB_ENV echo "APPLE_ID_TEAM=${{ secrets.MACOS_APPLE_ID_TEAM }}" >> $GITHUB_ENV + - name: Download bundles + uses: actions/download-artifact@v3 + with: + name: bundles + path: bundles - name: Build app - run: npm run build -- --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never + run: npx electron-builder build --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never env: NODE_OPTIONS: --max-old-space-size=4096 - name: Prepare macOS artifact