Skip to content

ci: remove semantic-release and replace with explicit versioned workflow steps#1217

Draft
nickolas-dimitrakas wants to merge 5 commits intoworkstation/3.0-Releasefrom
ci/remove-release-sh
Draft

ci: remove semantic-release and replace with explicit versioned workflow steps#1217
nickolas-dimitrakas wants to merge 5 commits intoworkstation/3.0-Releasefrom
ci/remove-release-sh

Conversation

@nickolas-dimitrakas
Copy link
Contributor

@nickolas-dimitrakas nickolas-dimitrakas commented Mar 19, 2026

Background

  • semantic-release was doing version determination, changelog generation, package bumping, npm publishing, GitHub release creation, and git commits/tagging — all hidden inside a single npx semantic-release call.
  • Phase 1 of this effort (earlier commits) removed scripts/release.sh from the prepareCmd hook and exposed the dist/ build and kit version-bump as named workflow steps.
  • This PR completes the decoupling by removing semantic-release entirely and replacing every responsibility with explicit, readable workflow steps.
  • Part of the broader effort to separate release work from deploy work and move toward a transparent, operator-friendly release process (follow-up to feat: update release process #1210).

What Changed

  • release.config.js: deleted
  • Both staging-step-1.yml and release.yml:
    • Added bump_type input (patch / minor / major) to workflow_dispatch — this is now how the release version is determined
    • Replaced npx semantic-release --dry-run with a Calculate next version step that runs npm version $bump_type --no-git-tag-version and exposes the result to all downstream steps
    • Replaced npx semantic-release with four explicit named steps:
      1. Commit package.json version bump — stages and commits package.json + package-lock.json
      2. Create release taggit tag vX.Y.Z
      3. Publish SDK to npmnpm publish (OIDC unchanged)
      4. Create GitHub releasegh release create with the same dist assets as before
    • Push step extended to also push the git tag
    • Removed the semantic-release-only job-level env block (GITHUB_TOKEN, GIT_AUTHOR_*, GIT_COMMITTER_*); git identity is set by the Import GPG Key step
  • release.yml permissions updated from contents: read to contents: write (required to push the tag)

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • CHANGELOG.md auto-generation (previously @semantic-release/changelog) is deferred — updates will be manual until a replacement script is introduced.
  • steps.get-version.outputs.version is preserved as the step ID and output name, so the release-kits job in staging-step-1.yml continues to work without changes.

Reference Issue (For employees only. Ignore if you are an outside contributor)

…flow steps

The build-dist and kit-version-update responsibilities previously hidden
inside scripts/release.sh (called via semantic-release's prepareCmd hook)
are now two named, visible steps in the staging-step-1.yml release job:

  1. 'Build distribution bundle'  — npm run build + git add dist -f + commit
  2. 'Update kit versions to X.Y.Z' — npm pkg set version for every kit in
     kits/matrix.json + commit kits/**/package.json

Both steps run only on a real release (dryRun == 'false') and execute after
the existing dry-run step captures the next version, so the version is
available via steps.get-version.outputs.version.

release.config.js is updated in lockstep:
  - prepareCmd removed from @semantic-release/exec (only publishCmd remains)
  - kits/**/package.json removed from @semantic-release/git assets (those
    package.jsons are now committed by the explicit workflow step before
    semantic-release runs, so they are already clean when the git plugin
    stages its assets)

The end-to-end ordering is unchanged: the two prep commits land on the
local staging branch before npx semantic-release runs; @semantic-release/git
pushes all local commits to staging; release-kits (which needs: release)
then checks out the updated staging branch and publishes each kit at the
correct version.

Refs #1210

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nickolas-dimitrakas nickolas-dimitrakas marked this pull request as draft March 19, 2026 18:25
@nickolas-dimitrakas nickolas-dimitrakas changed the title ci(release): replace release.sh prepare hook with explicit named workflow steps ci: remove release.sh and surface build steps as explicit workflow steps Mar 19, 2026
@nickolas-dimitrakas nickolas-dimitrakas changed the title ci: remove release.sh and surface build steps as explicit workflow steps ci: remove release.sh from semantic-release prepare hook Mar 19, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

run: |
npm run build
git add dist -f
git commit -m 'chore(build): Generate latest bundle [skip ci]'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build runs before version bump, embedding stale sdkVersion

High Severity

The npm run build step now runs before npx semantic-release, but the build reads version from package.json (via src/constants.ts line 1: import { version } from '../package.json') and embeds it as sdkVersion. Previously, release.sh ran inside semantic-release's prepareCmd, which executes after @semantic-release/npm bumps package.json. Now the build uses the old, pre-bump version, so every release ships dist files reporting the previous release's sdkVersion in all API requests (batch uploads, identity calls).

Additional Locations (1)
Fix in Cursor Fix in Web

nickolas-dimitrakas and others added 2 commits March 19, 2026 14:31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ned workflow steps

Removes release.config.js entirely. All responsibilities previously owned
by semantic-release are now explicit, named steps in both staging-step-1.yml
and release.yml:

- Version determination: a new bump_type input (major/minor/patch) on
  workflow_dispatch drives `npm version $bump_type --no-git-tag-version`,
  which bumps package.json and package-lock.json and surfaces the new
  version to all downstream steps via steps.get-version.outputs.version.
- npm publish: explicit `npm publish` step (OIDC unchanged).
- GitHub release: `gh release create` step with the same dist assets that
  @semantic-release/github was uploading.
- Git commit + tag: explicit `git commit` and `git tag` steps; tag is
  pushed alongside the release branch in the final push step.

The semantic-release-only job-level env block (GITHUB_TOKEN, GIT_AUTHOR_*,
GIT_COMMITTER_*) is removed from both workflows; git identity is already
set by the Import GPG Key step. release.yml permissions are updated from
contents:read to contents:write to allow pushing the tag.

Deferred: CHANGELOG.md auto-generation (was @semantic-release/changelog).

Refs #1210

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nickolas-dimitrakas nickolas-dimitrakas changed the title ci: remove release.sh from semantic-release prepare hook ci: remove semantic-release and replace with explicit versioned workflow steps Mar 19, 2026
nickolas-dimitrakas and others added 2 commits March 19, 2026 15:38
The semantic-release removal applies only to the 3-step staging process
(staging-step-1/2/3.yml). release.yml is a separate public/master
workflow and is out of scope for this PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ment first

Removes the temporary release/$RUN_NUM branch entirely. The previous
pattern created the branch from development, merged it into staging
inside the release job, then pushed release commits back to the temp
branch and deleted it — a round-trip that also had a bug where
release-kits would check out staging but staging never actually received
the release commits (only the temp branch did).

New approach:
- sync-staging-with-development (new job): immediately after
  confirm-staging-branch, merges development into staging and pushes,
  so staging is current before any build or test runs
- build-bundle now checks out staging (not development) since they are
  identical after the sync
- release job: remove the "Merge release branch" step (staging is already
  synced); push directly to HEAD:staging + tag at the end
- release-kits checks out staging and now correctly gets the bumped kit
  versions since the release job pushed to staging
- create-release-branch and cleanup jobs removed entirely

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant