Skip to content
Latchkey

Release Electron App workflow (1j01/jspaint)

The Release Electron App workflow from 1j01/jspaint, explained and optimized by Latchkey.

F

CI health: F - at risk

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: 1j01/jspaint.github/workflows/release-desktop-app.ymlLicense MITView source

What it does

This is the Release Electron App workflow from the 1j01/jspaint repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Release Electron App
on:
  push:
    tags:
      - "v*"
  workflow_dispatch:
permissions:
  id-token: write # Required for OIDC
  contents: write # Required for creating releases
jobs:
  publish:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-22.04, windows-latest, macos-latest]

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: "22"
          registry-url: "https://registry.npmjs.org"

      - name: Install Node.js dependencies
        run: npm ci

      - name: Build and upload binaries
        run: npm run electron:publish
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          JSPAINT_OFFICIAL_RELEASE: "true"

      - name: Extract changelog section
        if: runner.os == 'Windows'
        id: changelog
        shell: bash
        run: node scripts/release/extract-changelog.js >> $GITHUB_OUTPUT

      - name: Update Release
        if: runner.os == 'Windows'
        uses: ncipollo/release-action@v1.20.0
        with:
          body: ${{ steps.changelog.outputs.changelog }}
          allowUpdates: true
          tag: ${{ github.ref_name }}
          name: ${{ github.ref_name }}
          token: ${{ secrets.GITHUB_TOKEN }}
          draft: true

      # - name: Publish to Windows Store
      #   uses: isaacrlevin/windows-store-action@25ac1ac31e3434add3fede11f458a453fe371fb0
      #   with:
      #     tenant-id: ${{ secrets.AZURE_AD_TENANT_ID }}
      #     client-id: ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }}
      #     client-secret: ${{ secrets.AZURE_AD_APPLICATION_SECRET }}
      #     app-id: ${{ secrets.STORE_APP_ID }}
      #     package-path: "${{ github.workspace }}/out/make/msix/x64/JS Paint.msix"

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: Release Electron App
on:
  push:
    tags:
      - "v*"
  workflow_dispatch:
permissions:
  id-token: write # Required for OIDC
  contents: write # Required for creating releases
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  publish:
    timeout-minutes: 30
    runs-on: ${{ matrix.os }}
 
    strategy:
      matrix:
        os: [ubuntu-22.04, windows-latest, macos-latest]
 
    steps:
      - uses: actions/checkout@v4
 
      - uses: actions/setup-node@v4
        with:
          cache: 'npm'
          node-version: "22"
          registry-url: "https://registry.npmjs.org"
 
      - name: Install Node.js dependencies
        run: npm ci
 
      - name: Build and upload binaries
        run: npm run electron:publish
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          JSPAINT_OFFICIAL_RELEASE: "true"
 
      - name: Extract changelog section
        if: runner.os == 'Windows'
        id: changelog
        shell: bash
        run: node scripts/release/extract-changelog.js >> $GITHUB_OUTPUT
 
      - name: Update Release
        if: runner.os == 'Windows'
        uses: ncipollo/release-action@v1.20.0
        with:
          body: ${{ steps.changelog.outputs.changelog }}
          allowUpdates: true
          tag: ${{ github.ref_name }}
          name: ${{ github.ref_name }}
          token: ${{ secrets.GITHUB_TOKEN }}
          draft: true
 
      # - name: Publish to Windows Store
      #   uses: isaacrlevin/windows-store-action@25ac1ac31e3434add3fede11f458a453fe371fb0
      #   with:
      #     tenant-id: ${{ secrets.AZURE_AD_TENANT_ID }}
      #     client-id: ${{ secrets.AZURE_AD_APPLICATION_CLIENT_ID }}
      #     client-secret: ${{ secrets.AZURE_AD_APPLICATION_SECRET }}
      #     app-id: ${{ secrets.STORE_APP_ID }}
      #     package-path: "${{ github.workspace }}/out/make/msix/x64/JS Paint.msix"
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 1 job (3 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow