Skip to content
Latchkey

Release workflow (handlebars-lang/handlebars.js)

The Release workflow from handlebars-lang/handlebars.js, explained and optimized by Latchkey.

C

CI health: C - fair

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: handlebars-lang/handlebars.js.github/workflows/release.ymlLicense MITView source

What it does

This is the Release workflow from the handlebars-lang/handlebars.js 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

on:
  workflow_dispatch:
  push:
    branches:
      - master
    tags:
      - '*'

jobs:
  publish-aws-s3:
    name: Publish to AWS S3
    runs-on: 'ubuntu-latest'
    environment: 'builds.handlebarsjs.com.s3.amazonaws.com'
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          submodules: true

      - name: Setup pnpm
        uses: pnpm/action-setup@v4

      - name: Setup Node.js
        uses: actions/setup-node@v6
        with:
          node-version: '24'
          cache: 'pnpm'

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Publish
        run: |
          git config --global user.email "release@handlebarsjs.com"
          git config --global user.name "handlebars-lang"
          pnpm run publish:aws
        env:
          S3_BUCKET_NAME: 'builds.handlebarsjs.com'
          S3_REGION: 'us-east-1'
          S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
          S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}

The same workflow, on Latchkey

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

name: Release
 
on:
  workflow_dispatch:
  push:
    branches:
      - master
    tags:
      - '*'
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  publish-aws-s3:
    timeout-minutes: 30
    name: Publish to AWS S3
    runs-on: 'ubuntu-latest'
    environment: 'builds.handlebarsjs.com.s3.amazonaws.com'
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          submodules: true
 
      - name: Setup pnpm
        uses: pnpm/action-setup@v4
 
      - name: Setup Node.js
        uses: actions/setup-node@v6
        with:
          node-version: '24'
          cache: 'pnpm'
 
      - name: Install dependencies
        run: pnpm install --frozen-lockfile
 
      - name: Publish
        run: |
          git config --global user.email "release@handlebarsjs.com"
          git config --global user.name "handlebars-lang"
          pnpm run publish:aws
        env:
          S3_BUCKET_NAME: 'builds.handlebarsjs.com'
          S3_REGION: 'us-east-1'
          S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
          S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
 

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

Actions used in this workflow