Martin
Martin

Reputation: 1578

How Can I Run `electron-windows-store` in a GitHub Actions Workflow in the Cloud?

I want to automate the process of packaging my Electron app into a Windows Store .appx package using electron-windows-store in a GitHub Actions workflow. Currently, this process is done manually, and I am looking to determine if it's possible to automate entirely in the cloud.

Here’s how I currently package my app manually:

electron-windows-store --input-directory C:\Path\To\YourApp\dist\win-unpacked `
                       --output-directory C:\Path\To\YourApp\Output `
                       --package-version 1.0.0.0 `
                       --package-name YourApp `
                       --package-display-name 'YourApp' `
                       --publisher-display-name 'YourPublisher' `
                       --identity-name YourPublisher.Identity `
                       -a C:\Path\To\YourApp\Resources\

I manually:

  1. Download the .appx output from tools like electron-builder.
  2. Run the above command in an elevated PowerShell session on my local machine.
  3. Upload the signed .appx package to the Windows Store.

For macOS and Linux, I am able to sign and release packages entirely in the cloud using GitHub Actions. However, the Windows process requires local intervention, and I’m unsure if it can be done entirely in the cloud.

Draft GitHub Actions Workflow (Concept)

This is a conceptual idea of how I imagine the workflow could work:

name: Build Windows Store App

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: windows-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18

      - name: Install dependencies
        run: npm install

      - name: Run electron-windows-store
        run: electron-windows-store --input-directory ./dist/win-unpacked `
                                    --output-directory ./output `
                                    --package-version 1.0.0.0 `
                                    --package-name YourApp `
                                    --package-display-name 'YourApp' `
                                    --publisher-display-name 'YourPublisher' `
                                    --identity-name YourPublisher.Identity

Question:

Is it possible to fully automate the electron-windows-store process in a GitHub Actions workflow using the windows-latest runner, including packaging, signing, and creating the .appx file without manual intervention?

Additional Context:

Any guidance or insights on automating this process would be greatly appreciated!

Upvotes: 2

Views: 26

Answers (0)

Related Questions