Skip to content
Latchkey

Create releases workflow (openai/openai-go)

The Create releases workflow from openai/openai-go, explained and optimized by Latchkey.

C

CI health: C - fair

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

Grade your own workflow free or run it on Latchkey →
Source: openai/openai-go.github/workflows/create-releases.ymlLicense Apache-2.0View source

What it does

This is the Create releases workflow from the openai/openai-go 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: Create releases
on:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  release:
    name: release
    if: github.ref == 'refs/heads/main' && github.repository == 'openai/openai-go'
    runs-on: ubuntu-latest
    outputs:
      releases_created: ${{ steps.release.outputs.releases_created }}

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

      - uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1.4.0
        id: release
        with:
          repo: ${{ github.event.repository.full_name }}
          stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

  publish:
    name: publish
    needs: release
    if: ${{ needs.release.outputs.releases_created == 'true' }}
    runs-on: ubuntu-latest
    environment: publish

    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

      - name: Generate godocs
        run: |
          # x-release-please-start-version
          version="$(jq -r '. | to_entries[0] | .value' .release-please-manifest.json)"
          curl --fail --show-error --silent -X POST "https://pkg.go.dev/fetch/github.com/openai/openai-go/v2@v${version}"

The same workflow, on Latchkey

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

name: Create releases
on:
  push:
    branches:
      - main
 
permissions:
  contents: read
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  release:
    timeout-minutes: 30
    name: release
    if: github.ref == 'refs/heads/main' && github.repository == 'openai/openai-go'
    runs-on: latchkey-small
    outputs:
      releases_created: ${{ steps.release.outputs.releases_created }}
 
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
 
      - uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1.4.0
        id: release
        with:
          repo: ${{ github.event.repository.full_name }}
          stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
 
  publish:
    timeout-minutes: 30
    name: publish
    needs: release
    if: ${{ needs.release.outputs.releases_created == 'true' }}
    runs-on: latchkey-small
    environment: publish
 
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
 
      - name: Generate godocs
        run: |
          # x-release-please-start-version
          version="$(jq -r '. | to_entries[0] | .value' .release-please-manifest.json)"
          curl --fail --show-error --silent -X POST "https://pkg.go.dev/fetch/github.com/openai/openai-go/v2@v${version}"
 

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

Actions used in this workflow