Skip to content

[CI/CD] Implement Git tagging and ensure release atomicity between CLI and GUI #1

@ZhanZiyuan

Description

@ZhanZiyuan

Description:

Currently, the release-cli.yml workflow publishes the package to npm if the version in package.json is updated, but it does not create a Git tag. The release-gui.yml is then triggered by workflow_run, which builds the binaries and creates the GitHub Release.

This flow has several risks:

  • Broken Atomicity: If release-cli succeeds (NPM updated) but release-gui fails (e.g., a Windows build error), the NPM package will point to a version that has no corresponding GitHub Release or Git tag.
  • Missing Source of Truth: There is no Git tag (e.g., v1.0.0) created in the repository history to mark the exact state of the code for a specific release.
  • Inconsistent Release State: If a user downloads the CLI from NPM, they might expect a corresponding GitHub Release to exist immediately.

Suggested Solution:

  • Modify release-cli.yml to create and push a Git tag after a successful NPM publish.
  • Consider merging the release logic or using the creation of a Git tag (v*) as the primary trigger for both CLI and GUI releases to ensure they are tied to the same commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions