Skip to content

ci(release): document unified-versioning invariant; make guard per-package if versioning ever diverges #122

@stackbilt-admin

Description

@stackbilt-admin

The Verify workspace versions match tag step in .github/workflows/release.yml encodes charter's current convention: all packages/*/package.json versions must match the release tag. This works today because charter does synchronized version bumps across all 11 workspace packages.

If charter ever adopts independent per-package versioning (e.g., @stackbilt/cli@1.0.0 while @stackbilt/blast@0.12.5), this guard needs to be reworked to validate each package against its own expected version rather than against a single tag value.

Current code

TAG="${{ github.event.inputs.tag || github.ref_name }}"
EXPECTED="${TAG#v}"
FAIL=0
for p in packages/*/package.json; do
  V=$(node -p "require('./$p').version")
  N=$(node -p "require('./$p').name")
  if [[ "$V" != "$EXPECTED" ]]; then
    echo "::error::$N version $V does not match tag $EXPECTED"
    FAIL=1
  fi
done

Filed so that any future discussion of per-package versioning surfaces the workflow change as a prerequisite rather than a forgotten dependency. Not urgent — unified versioning works today and there's no concrete plan to migrate.

Originally flagged by CodeBeast review of #118.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v0.13Targeted for Charter v0.13

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions