fix: clean up and harden GitHub Actions workflows#437
Conversation
- Fix AGENTS.md workflow filename table to match actual filenames - Fix package-test-sandbox-cloudflare.yaml path filters (add src/packages/sandbox-cloudflare/**) - Remove workflow_dispatch from all 10 release workflows (tag-only triggers) - Remove version comments from action SHA pins across all 27 workflows - Unify Node.js version to 22 (was 20 in 9 files) - Unify pnpm version to 10 (was 9 in docs-test.yaml) - Fix security-reusable.yaml: use pnpm/action-setup instead of npm install -g pnpm - Add --provenance to npm publish steps (OIDC trusted publishers) - Fix package-release-openclaw.yaml cache key (package.json → package-lock.json) - Add version verification step to publish-chart.yaml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Quote $GITHUB_OUTPUT and $GITHUB_ENV references (SC2086)
- Quote variable expansions in npm view commands (SC2086)
- Move ${{ github.ref }} to env var to avoid SC2193 false positive
- Use heredoc for changelog generation instead of repeated redirects (SC2129)
- Move ${{ secrets.GITHUB_TOKEN }} to env var in publish-chart.yaml
- Quote ${{ env.CHART_PATH }} and helm push arguments
All workflows now pass actionlint with zero warnings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace static changelog templates across all 10 release workflows with a reusable script that generates real changelogs from git history. The script scopes commits to each component's source directory and groups them by conventional commit type (feat/fix/other). - Create .github/scripts/generate-changelog.sh - Add source_dir input to reusable Docker release workflow - Add GitHub Release step to publish-chart.yaml (was missing) - Update AGENTS.md to document the changelog script Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code reviewFound 1 issue:
Affected workflows: Script (tag lookup that will fail on shallow clone): Acontext/.github/scripts/generate-changelog.sh Lines 54 to 58 in a4740db Example checkout missing Acontext/.github/workflows/cli-release.yaml Lines 17 to 19 in a4740db Acontext/.github/workflows/_reusable-docker-release.yaml Lines 36 to 38 in a4740db 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…eneration generate-changelog.sh uses `git tag -l` and `git log` to build changelogs, but all release workflows used shallow clones (default fetch-depth: 1), so the script could never find previous tags and always output "Initial release." Add `fetch-depth: 0` to the checkout step in the job that calls generate-changelog.sh across all 8 release workflows. Update AGENTS.md to document this requirement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix: Add
|
…lease workflows - Strip leading whitespace from heredoc footer content to prevent markdown rendering issues in changelogs - Replace VERSION_PLACEHOLDER + bash substitution with direct variable interpolation in openclaw and sandbox-cloudflare workflows - Add missing blank line before ### Pull Requests in AGENTS.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Wrap grep -v in { ... || true; } to prevent pipefail exit on first
release when only one tag exists
- Add fallback message when no path-scoped commits exist between tags
- Derive Helm chart version from GITHUB_REF instead of relying on
ACONEXT_CHART_VERSION_TAG env var from previous step
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Why we need this PR?
The workflow filenames documented in AGENTS.md don't match the actual files under
.github/workflows/. Multiple workflows also have incorrect path filters, inconsistent Node.js/pnpm versions, missing version checks, and other issues that can cause CI triggers to be missed or release pipelines to behave inconsistently. Additionally, all 10 release workflows generate static changelog templates (just a title + install command) with no actual code changes listed between versions.Describe your solution
Systematic fixes across all 27 workflow files and
AGENTS.md:src/packages/sandbox-cloudflare/**topackage-test-sandbox-cloudflare.yamlworkflow_dispatch— 10 release workflows now trigger only on tags# vX.Y.Zfrom all action SHA pins (SHA itself is the pin)docs-test.yamlsecurity-reusable.yamlnow usespnpm/action-setupaction instead ofnpm install -g pnpm--provenanceto npm publish — 3 npm release workflows (OIDC trusted publishers auth)package-release-openclaw.yamlcache-dependency-path changed topackage-lock.jsonpublish-chart.yamlnow verifies tag matchesChart.yamlversion before publishing.github/scripts/generate-changelog.shreplaces static changelog templates in all release workflows. Scopesgit logto each component's source directory and groups commits by conventional commit type (Features, Bug Fixes, Other).publish-chart.yamlnow creates a GitHub Release (was missing entirely)Implementation Tasks
.github/scripts/generate-changelog.shreusable changelog script_reusable-docker-release.yaml(addsource_dirinput)source_dirfrom api/core/ui-release.yaml callersImpact Areas
Checklist
devbranch.🤖 Generated with Claude Code