Skip to content
Latchkey

Build macOS DMG workflow (ogkalu2/comic-translate)

The Build macOS DMG workflow from ogkalu2/comic-translate, explained and optimized by Latchkey.

A

CI health: A - excellent

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: ogkalu2/comic-translate.github/workflows/build-macos-dmg.ymlLicense Apache-2.0View source

What it does

This is the Build macOS DMG workflow from the ogkalu2/comic-translate repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

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

The workflow

workflow (.yml)
name: Build macOS DMG

on:
  workflow_dispatch:

jobs:
  build-dmg:
    runs-on: macos-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v5

      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.14.5'
          cache: 'pip'

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install pyinstaller

      - name: Install create-dmg
        run: brew install create-dmg

      - name: Build app with PyInstaller
        env:
          MACOSX_DEPLOYMENT_TARGET: '12.0'
        run: pyinstaller ct-mac.spec

      - name: Build DMG
        run: |
          chmod +x builddmg.sh
          ./builddmg.sh

      - name: Upload DMG artifact
        uses: actions/upload-artifact@v6
        with:
          name: Comic-Translate-macOS
          path: "dist/Comic Translate.dmg"
          if-no-files-found: error
          retention-days: 30

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Build macOS DMG
 
on:
  workflow_dispatch:
 
jobs:
  build-dmg:
    timeout-minutes: 30
    runs-on: macos-latest
 
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
 
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.14.5'
          cache: 'pip'
 
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install pyinstaller
 
      - name: Install create-dmg
        run: brew install create-dmg
 
      - name: Build app with PyInstaller
        env:
          MACOSX_DEPLOYMENT_TARGET: '12.0'
        run: pyinstaller ct-mac.spec
 
      - name: Build DMG
        run: |
          chmod +x builddmg.sh
          ./builddmg.sh
 
      - name: Upload DMG artifact
        uses: actions/upload-artifact@v6
        with:
          name: Comic-Translate-macOS
          path: "dist/Comic Translate.dmg"
          if-no-files-found: error
          retention-days: 30
 

What changed

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 per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow