Skip to content

ci(release): disable git hooks during automated release - #59

Merged
zhang-hongjie merged 1 commit into
masterfrom
ci/fix-release-git-push
Oct 16, 2026
Merged

zhang-hongjie merged 1 commit into
masterfrom
ci/fix-release-git-push

Conversation

@zhang-hongjie

Copy link
Copy Markdown
Collaborator

Requirements

  • Fill out the relevant sections below; explain items that do not apply.
  • Add or update appropriate tests for behavior changes. For documentation-only
    changes, explain why test-suite changes are unnecessary and describe the
    documentation or metadata checks performed.
  • Preserve the existing regression, Bash/zsh compatibility and mandatory 100%
    measurable-line coverage gates. Do not weaken checks to obtain a passing result.
  • All status checks must pass before merge. Pending or unrun checks are
    not passing results.

Type

  • Bug fix
  • Feature change
  • Performance
  • Refactor
  • Documentation
  • CI/CD
  • Test
  • Build
  • Style
  • Chore

Issue (only for type bug fix/feature change)

Not applicable: this is a CI/CD release fix.

Description of the Change

Disable Husky hooks only for the automated semantic-release step by setting
HUSKY=0.

The previous release run successfully completed npm OIDC authentication, but
@semantic-release/git triggered the repository pre-push hook while pushing
the release commit/tag. That hook reran npm test in the release job, where zsh
was not installed, causing the release to fail.

The normal lint, regression, Bash/zsh compatibility and coverage jobs remain
unchanged.

Contract and Compatibility

Not applicable to the public Bash-base API.

No Bash/zsh runtime behavior, function contract, dependency, installation method
or coverage requirement is changed.

The only behavior change is that Git pushes performed by the automated
semantic-release step do not execute local Husky hooks. Required CI quality
gates still run before the release jobs.

Validation

Completed evidence from the previous GitHub Actions release run:

  • lint: passed
  • test: passed
  • coverage-macos: passed
  • semantic-release-preview: passed
  • npm OIDC token exchange: succeeded
  • semantic-release failed only when the Husky pre-push hook reran npm test
    and reported that zsh was unavailable

No production Shell code or tests are modified by this change.

Pending before merge:

  • all GitHub Actions checks for this PR must pass
  • the next master release must complete the real npm OIDC publish successfully

Possible Drawbacks

The automated semantic-release Git push will bypass Husky hooks.

This is intentional because the same repository validation is already enforced
by required CI jobs before release. Developer-local hooks remain unchanged.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c1b5832) to head (2f411d2).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #59   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          585       585           
=========================================
  Hits           585       585           
Flag Coverage Δ
strict-union 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zhang-hongjie
zhang-hongjie merged commit 7ad2497 into master Oct 16, 2026
8 checks passed
@zhang-hongjie
zhang-hongjie deleted the ci/fix-release-git-push branch October 16, 2026 12:42
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant