Skip to content
Latchkey

Release ZIP packages workflow (martin-rizzo/AmazingZImageWorkflow)

The Release ZIP packages workflow from martin-rizzo/AmazingZImageWorkflow, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: martin-rizzo/AmazingZImageWorkflow.github/workflows/release.ymlLicense UnlicenseView source

What it does

This is the Release ZIP packages workflow from the martin-rizzo/AmazingZImageWorkflow repository, a real project running GitHub Actions. It is shown here with attribution under its Unlicense license.

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

The workflow

workflow (.yml)
#
# File    : .github/workflows/release.yml
# Purpose : Github workflow to invoke release.sh and upload ZIPs as a release.
# Author  : Martin Rizzo | <martinrizzo@gmail.com>
# Date    : Dec 12, 2025
# Repo    : https://github.com/martin-rizzo/AmazingZImageWorkflow
# License : Unlicense
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                           Amazing Z-Image Workflow
#  Z-Image workflow with customizable image styles and GPU-friendly versions
#_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*/
name: Release ZIP packages
permissions:
  contents: write
on:
  push:
    tags:
      - '*'
jobs:
  build-and-release:
    name: Build and Release
    runs-on: ubuntu-24.04

    steps:

      - name: Checkout code
        uses: actions/checkout@v4

      - name: Zipping All Amazing Z-Image Packages
        run: |
          source files/scripts/release.sh "${{ github.ref_name }}" "${{ github.workspace }}"
          echo "RELEASE_DIR=$RELEASE_DIR" >> $GITHUB_ENV

      - name: Print ZIP Path (debugging)
        run: |
          echo "RELEASE_DIR=${{ env.RELEASE_DIR }}"

      - name: Upload ZIP Packages to Release
        uses: svenstaro/upload-release-action@2.11.3
        with:
          release_name: "Amazing Z-Image WF ${{ github.ref_name }}"
          body        : "Automatic release generated for the tag ${{ github.ref_name }}"
          file        : ${{ env.RELEASE_DIR }}/*  #< the folder which has all the files to release
          repo_token  : ${{ secrets.GITHUB_TOKEN }}
          tag         : ${{ github.ref }}
          overwrite   : true
          file_glob   : true
          draft       : true

The same workflow, on Latchkey

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

#
# File    : .github/workflows/release.yml
# Purpose : Github workflow to invoke release.sh and upload ZIPs as a release.
# Author  : Martin Rizzo | <martinrizzo@gmail.com>
# Date    : Dec 12, 2025
# Repo    : https://github.com/martin-rizzo/AmazingZImageWorkflow
# License : Unlicense
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                           Amazing Z-Image Workflow
#  Z-Image workflow with customizable image styles and GPU-friendly versions
#_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*/
name: Release ZIP packages
permissions:
  contents: write
on:
  push:
    tags:
      - '*'
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  build-and-release:
    timeout-minutes: 30
    name: Build and Release
    runs-on: latchkey-small
 
    steps:
 
      - name: Checkout code
        uses: actions/checkout@v4
 
      - name: Zipping All Amazing Z-Image Packages
        run: |
          source files/scripts/release.sh "${{ github.ref_name }}" "${{ github.workspace }}"
          echo "RELEASE_DIR=$RELEASE_DIR" >> $GITHUB_ENV
 
      - name: Print ZIP Path (debugging)
        run: |
          echo "RELEASE_DIR=${{ env.RELEASE_DIR }}"
 
      - name: Upload ZIP Packages to Release
        uses: svenstaro/upload-release-action@2.11.3
        with:
          release_name: "Amazing Z-Image WF ${{ github.ref_name }}"
          body        : "Automatic release generated for the tag ${{ github.ref_name }}"
          file        : ${{ env.RELEASE_DIR }}/*  #< the folder which has all the files to release
          repo_token  : ${{ secrets.GITHUB_TOKEN }}
          tag         : ${{ github.ref }}
          overwrite   : true
          file_glob   : true
          draft       : true
 

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.

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