Skip to content

fix(ci): add fallback publish for semantic-release git-notes bug - #257

Merged
michaeljymsgutierrez merged 1 commit into
mainfrom
fix/release-notes-push-fallback
Oct 10, 2026
Merged

michaeljymsgutierrez merged 1 commit into
mainfrom
fix/release-notes-push-fallback

Conversation

@michaeljymsgutierrez

@michaeljymsgutierrez michaeljymsgutierrez commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Description

Adds a fallback to the Release workflow for a known, unfixed upstream semantic-release bug (semantic-release/semantic-release#1762): semantic-release unconditionally pushes a git-notes ref (refs/notes/semantic-release-*) as part of its core release flow, before it ever calls the npm/GitHub publish steps. When that push fails - as it did on the one release run this workflow has completed so far (run 38067588114, 2026-10-10) - the version bump, build, commit, and tag have already landed, but the actual npm publish and GitHub release never run. There is no plugin option or flag to disable the notes push; it is unconditional core behavior. This repo only ever releases from a single branch (main), so the multi-channel tracking the notes exist for isn't needed here.

Github Issue: None - found while manually triggering a release, not tracked by a filed issue.

Changes

  • .github/workflows/release.yml:
    • Added registry-url: https://registry.npmjs.org to the Setup Node.js step, so a direct npm publish later in the job can authenticate via NODE_AUTH_TOKEN.
    • The Release step now has id: release and continue-on-error: true, and pipes its output (with set -o pipefail so the step's exit code still reflects the real command, not tee) to release-output.log.
    • Added a Detect known git-notes push failure step that only runs if Release failed. It greps release-output.log for refs/notes/semantic-release; if found, it sets an output flag and lets the job continue. If the failure doesn't match that pattern, it exits non-zero so the job still fails normally for any other reason.
    • Added a Fallback publish step that only runs when that flag is set. It reads the version semantic-release already wrote to packages/package.json, then runs npm publish and gh release create --generate-notes directly.

How Has This Been Tested?

  • New tests: none - this is a CI workflow change, not application code.
  • Test results: not applicable - a workflow_dispatch workflow isn't unit-testable.
  • Manual testing: the YAML was validated for schema correctness with npx @action-validator/cli (passed). The fallback logic was traced against the actual failure output captured from the one real Release step failure this workflow has produced so far (run 38067588114, 2026-10-10), confirming the grep pattern matches that output and that packages/package.json's version is already updated by the point the fallback would run. The fallback steps themselves have not been exercised by an actual workflow run - there is no way to verify npm publish and gh release create succeed in this exact CI context without actually triggering a release.

Checklist

  • Code follows the project's coding standards and best practices - YAML-only change, no application code touched.
  • Tests are written for new functionality and existing tests pass - not applicable to a workflow file.
  • Documentation is updated to reflect changes - N/A.
  • The PR is assigned to the correct reviewers.

Reviewer Guidance

  • Specific scenarios to test: this can only be confirmed by an actual release run. After merging, run gh workflow run release.yml and watch the run. If the Release step fails again on the known git-notes issue, confirm the Detect known git-notes push failure and Fallback publish steps both run and succeed, and that the new version actually appears on the npm registry (npm view arm-js-library version) and as a GitHub release.
  • Expected behavior: even if Release shows a failure for the known git-notes reason, the overall job and workflow run complete successfully (green), with the new version published to npm and a GitHub release created.
  • What NOT to test: do not assume this is confirmed working just because the YAML parses correctly - it hasn't been exercised by a real run yet.
  • Reviewer notes: if Release fails for a reason other than the git-notes push, the Detect known git-notes push failure step deliberately exits non-zero and the fallback does not run - the whole job will show as failed, which is intentional so a real failure is never silently papered over.

@vercel

vercel Bot commented Oct 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
arm-js-library-demo Ready Ready Preview Oct 10, 2026 5:01pm UTC

@michaeljymsgutierrez
michaeljymsgutierrez marked this pull request as ready for review October 10, 2026 17:03
@michaeljymsgutierrez michaeljymsgutierrez self-assigned this Oct 10, 2026
@michaeljymsgutierrez
michaeljymsgutierrez merged commit f5be0dd into main Oct 10, 2026
5 checks passed
@michaeljymsgutierrez
michaeljymsgutierrez deleted the fix/release-notes-push-fallback branch October 10, 2026 17:04
@michaeljymsgutierrez

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 2.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@michaeljymsgutierrez michaeljymsgutierrez added released fix Bug fixes and patches labels Oct 10, 2026

This branch was successfully deployed

1 active deployment
Preview — 1c95f5be Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fixes and patches released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant