Skip to content

Document issue with GitHub Actions hanging #3315

Description

@cameronjeffords

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.4.1

Electron version

25.0.1

Operating system

macOS 12.6.7

Last known working Electron Forge version

N/A

Expected behavior

electron-forge make should succeed and publish the distributable to out/. Instead, it is hanging after the [STARTED] Making a pkg distributable for darwin/x64 step.

Actual behavior

yarn make hangs in the github action

Steps to reproduce

Running electron-forge make in a Github action.

Additional information

Overview:

  • electron-forge make succeeds when I run it for my package locally (personal mac M1). The distributable is built and saved successfully.
  • Github logs for the action stop here (will run for 1hr+ without doing anything):
[SUCCESS] Running postPackage hook
[SUCCESS] Running package command
[STARTED] Running preMake hook
[SUCCESS] Running preMake hook
[STARTED] Making distributables
[STARTED] Making a pkg distributable for darwin/x64

Forge Config:

const config: ForgeConfig = {
	packagerConfig: {
		osxSign: {
			identity: 'Developer ID Application: ***',
		},
		osxNotarize: {
			tool: 'notarytool',
			appleId: process.env.NOTARIZE_USERNAME,
			appleIdPassword: process.env.NOTARIZE_PASSWORD,
			teamId: process.env.NOTARIZE_ASC_PROVIDER,
		},
	},
	rebuildConfig: {},
	makers: [
		new MakerSquirrel({
			certificateFile: process.env['WINDOWS_PFX_FILE'],
			certificatePassword: process.env['WINDOWS_PFX_PASSWORD'],
		}),
		new MakerPKG({
			identity: 'Developer ID Installer: ***',
		}),
	],
	publishers: [
		new PublisherGithub({
			repository: {
				name: '***',
				owner: '***',
			},
			prerelease: true,
		}),
	],
	plugins: [
		new WebpackPlugin({
			mainConfig,
			devServer: {
				allowedHosts: 'auto',
			},
			devContentSecurityPolicy: "connect-src 'self' wss://***/socket.io/ 'unsafe-eval'",
			renderer: {
				config: rendererConfig,
				entryPoints: [
					{
						html: './src/index.html',
						js: './src/renderer.ts',
						name: 'main_window',
						preload: {
							js: './src/preload.ts',
						},
					},
				],
			},
		}),
	],
}

Github Action:

name: Package

on:
  push:
    branches:
      - main

jobs:
  build:
    name: Build ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest]
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Get Node.js 16
        uses: actions/setup-node@v3
        with:
          node-version: 16
      - name: Install yarn
        run: npm install -g yarn
      - name: Yarn
        run: yarn
      - name: Install global dependencies
        run: npm install -g yarn ngrok
      - name: Add MacOS certs
        if: matrix.os == 'macos-latest'
        run: chmod +x src/scripts/add-cert.sh && ./src/scripts/add-cert.sh
        env:
          CERTIFICATE_OSX_APPLICATION_BUNDLE: ${{ secrets.CERTIFICATE_OSX_APPLICATION_BUNDLE }}
          CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
      - name: Forge Package
        if: matrix.os == 'macos-latest'
        run: yarn make
        env:
            NOTARIZE_ASC_PROVIDER: ${{ secrets.NOTARIZE_ASC_PROVIDER }}
            NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }}
            NOTARIZE_USERNAME: ${{ secrets.NOTARIZE_USERNAME }}
            DEBUG: electron-forge:*
  • I also tried building for arm64 with the same result, using yarn make --arch arm64

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions