Skip to content
Latchkey

Create a standalone EXE with PyInstaller workflow (Z1ni/XGP-save-extractor)

The Create a standalone EXE with PyInstaller workflow from Z1ni/XGP-save-extractor, explained and optimized by Latchkey.

D

CI health: D - needs work

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: Z1ni/XGP-save-extractor.github/workflows/pyinstaller.ymlLicense MITView source

What it does

This is the Create a standalone EXE with PyInstaller workflow from the Z1ni/XGP-save-extractor 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: 'Create a standalone EXE with PyInstaller'
on:
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - 'main.py'
      - 'games.json'
  pull_request:
    branches:
      - main
    paths:
      - 'main.py'
      - 'games.json'
jobs:
  create-standalone-exe:
    runs-on: windows-latest
    steps:
      - name: Check out repo
        uses: actions/checkout@v4
      - name: Setup Python
        uses: actions/setup-python@v5.1.0
        with:
          python-version: '3.12'
      - name: Install PyInstaller
        run: 'pip install PyInstaller'
      - name: Run PyInstaller
        run: 'pyinstaller -F -n xgp-save-extractor --add-data games.json:. main.py'
      - name: Upload standalone EXE
        uses: actions/upload-artifact@v4
        with:
          name: xgp-save-extractor
          path: dist/xgp-save-extractor.exe

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: 'Create a standalone EXE with PyInstaller'
on:
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - 'main.py'
      - 'games.json'
  pull_request:
    branches:
      - main
    paths:
      - 'main.py'
      - 'games.json'
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  create-standalone-exe:
    timeout-minutes: 30
    runs-on: windows-latest
    steps:
      - name: Check out repo
        uses: actions/checkout@v4
      - name: Setup Python
        uses: actions/setup-python@v5.1.0
        with:
          cache: 'pip'
          python-version: '3.12'
      - name: Install PyInstaller
        run: 'pip install PyInstaller'
      - name: Run PyInstaller
        run: 'pyinstaller -F -n xgp-save-extractor --add-data games.json:. main.py'
      - name: Upload standalone EXE
        uses: actions/upload-artifact@v4
        with:
          name: xgp-save-extractor
          path: dist/xgp-save-extractor.exe
 

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