release workflow (ClickHouse/clickhouse-go)
The release workflow from ClickHouse/clickhouse-go, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the release workflow from the ClickHouse/clickhouse-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
name: release
permissions: write-all
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Generate Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.WORKFLOW_AUTH_PUBLIC_APP_ID }}
private-key: ${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }}
- uses: actions/checkout@main
with:
ref: main
fetch-depth: 0 # required to generate contributor list
token: ${{ steps.generate-token.outputs.token }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.25
- name: Prepare release
id: release
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
go run internal/cmd/release/main.go
- name: Commit And Push Changes
run: |
git config --local user.email "ch-integrations-robot@clickhouse.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update release notes"
git push
- name: Publish Draft Release
env:
RELEASE_API_URL: ${{ steps.release.outputs.RELEASE_URL }}
run: |
curl -X PATCH -H "Authorization: token ${{ steps.generate-token.outputs.token }}" -H "Accept: application/vnd.github.v3+json" $RELEASE_API_URL -d '{"draft": false}'
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: release permissions: write-all on: workflow_dispatch: jobs: publish: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Generate Token id: generate-token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.WORKFLOW_AUTH_PUBLIC_APP_ID }} private-key: ${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }} - uses: actions/checkout@main with: ref: main fetch-depth: 0 # required to generate contributor list token: ${{ steps.generate-token.outputs.token }} - name: Install Go uses: actions/setup-go@v5 with: go-version: 1.25 - name: Prepare release id: release env: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} run: | go run internal/cmd/release/main.go - name: Commit And Push Changes run: | git config --local user.email "ch-integrations-robot@clickhouse.com" git config --local user.name "GitHub Action" git add . git commit -m "Update release notes" git push - name: Publish Draft Release env: RELEASE_API_URL: ${{ steps.release.outputs.RELEASE_URL }} run: | curl -X PATCH -H "Authorization: token ${{ steps.generate-token.outputs.token }}" -H "Accept: application/vnd.github.v3+json" $RELEASE_API_URL -d '{"draft": false}'
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
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:
- Network fetches
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.