Skip to content
Latchkey

Release workflow (lowdefy/lowdefy)

The Release workflow from lowdefy/lowdefy, explained and optimized by Latchkey.

B

CI health: B - good

Point runs-on at Latchkey and get 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: lowdefy/lowdefy.github/workflows/release.yamlLicense Apache-2.0View source

What it does

This is the Release workflow from the lowdefy/lowdefy 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: Release
on:
  push:
    branches:
      - main

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
  contents: write
  pull-requests: write
  id-token: write

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    environment: publish
    if: github.repository == 'lowdefy/lowdefy'
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: pnpm
          registry-url: 'https://registry.npmjs.org'

      - run: pnpm i --frozen-lockfile
      - run: pnpm build
      - name: Upgrade npm for OIDC trusted publishing
        run: npm install -g npm@latest

      - name: Create Release Pull Request or Publish to npm
        id: changesets
        uses: changesets/action@v1
        with:
          version: pnpm release:version
          publish: pnpm release:publish
          createGithubReleases: false
          commit: 'chore: Publish new release'
          title: 'Publish new release'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_CONFIG_PROVENANCE: 'true'

      - name: Package VS Code Extention
        run: pnpm --filter lowdefy-vscode package

      - name: Generate release notes
        if: steps.changesets.outputs.published == 'true'
        id: release-notes
        run: |
          npm install -g @anthropic-ai/claude-code
          node scripts/release-notes.mjs --output-file=/tmp/release-notes.md

          # Extract version from script output
          VERSION=$(node -e "
            const fs = require('fs');
            const pkg = JSON.parse(fs.readFileSync('packages/cli/package.json', 'utf-8'));
            console.log('v' + pkg.version);
          ")
          echo "version=$VERSION" >> "$GITHUB_OUTPUT"
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

      - name: Create Github Release
        uses: softprops/action-gh-release@v2
        if: steps.changesets.outputs.published == 'true'
        with:
          tag_name: ${{ steps.release-notes.outputs.version }}
          name: ${{ steps.release-notes.outputs.version }}
          draft: true
          body_path: /tmp/release-notes.md
          files: |
            lowdefy-vscode-*.vsix
          target_commitish: ${{ github.sha }}

The same workflow, on Latchkey

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

name: Release
on:
  push:
    branches:
      - main
 
concurrency: ${{ github.workflow }}-${{ github.ref }}
 
permissions:
  contents: write
  pull-requests: write
  id-token: write
 
jobs:
  release:
    timeout-minutes: 30
    name: Release
    runs-on: latchkey-small
    environment: publish
    if: github.repository == 'lowdefy/lowdefy'
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: pnpm
          registry-url: 'https://registry.npmjs.org'
 
      - run: pnpm i --frozen-lockfile
      - run: pnpm build
      - name: Upgrade npm for OIDC trusted publishing
        run: npm install -g npm@latest
 
      - name: Create Release Pull Request or Publish to npm
        id: changesets
        uses: changesets/action@v1
        with:
          version: pnpm release:version
          publish: pnpm release:publish
          createGithubReleases: false
          commit: 'chore: Publish new release'
          title: 'Publish new release'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_CONFIG_PROVENANCE: 'true'
 
      - name: Package VS Code Extention
        run: pnpm --filter lowdefy-vscode package
 
      - name: Generate release notes
        if: steps.changesets.outputs.published == 'true'
        id: release-notes
        run: |
          npm install -g @anthropic-ai/claude-code
          node scripts/release-notes.mjs --output-file=/tmp/release-notes.md
 
          # Extract version from script output
          VERSION=$(node -e "
            const fs = require('fs');
            const pkg = JSON.parse(fs.readFileSync('packages/cli/package.json', 'utf-8'));
            console.log('v' + pkg.version);
          ")
          echo "version=$VERSION" >> "$GITHUB_OUTPUT"
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
 
      - name: Create Github Release
        uses: softprops/action-gh-release@v2
        if: steps.changesets.outputs.published == 'true'
        with:
          tag_name: ${{ steps.release-notes.outputs.version }}
          name: ${{ steps.release-notes.outputs.version }}
          draft: true
          body_path: /tmp/release-notes.md
          files: |
            lowdefy-vscode-*.vsix
          target_commitish: ${{ github.sha }}
 

What changed

3 third-party actions are referenced by a movable tag. Pin them 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