Skip to content

Commit ce74885

Browse files
committed
Merge branch 'feature/skills' into development
2 parents ef4ea93 + 27ee1a4 commit ce74885

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.agents/skills/ci-cd/SKILL.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,12 @@ One practical warning: the Ruby gem release depends on crates.io propagation. If
690690

691691
## Common mistakes
692692

693+
**SDK npm version out of sync with Rust crate version**
694+
`sdk/npm/smbcloud-auth/package.json` must have the same version as `crates/smbcloud-auth-sdk-wasm/Cargo.toml`. The `prepare-package.mjs` script compares them at build time and throws a hard error on mismatch. When bumping workspace crate versions for a release, always update the npm package version in the same commit. Forgetting this causes the `check-npm-sdk` CI job and the `release-sdk-npm` workflow to fail.
695+
696+
**Tagging a release on a feature branch instead of `development`**
697+
Always tag on `development` (the mainline branch). Tagging on a feature branch leaves `development` without the release commit, making git history confusing and future releases error-prone. Merge the feature branch into `development` first, then tag. If a tag was already placed on the wrong commit, move it with `git tag -f v<version>` and `git push origin v<version> --force`.
698+
693699
**Building the full workspace in release workflows**
694700
Always pass `--package smbcloud-cli` to `cargo build` and `cargo publish`. Omitting it builds `smbcloud-auth-sdk-py` (PyO3 cdylib) which fails on platforms without a matching Python interpreter.
695701

.agents/skills/smbcloud-cli-release/SKILL.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Use this skill when work touches any part of the smbCloud CLI distribution flow:
1919
Use these files as the release source of truth:
2020

2121
- Rust crate version and binary name: `crates/cli/Cargo.toml`
22+
- SDK WASM crate version: `crates/smbcloud-auth-sdk-wasm/Cargo.toml`
23+
- SDK npm package version: `sdk/npm/smbcloud-auth/package.json`
24+
- SDK npm build script: `sdk/npm/smbcloud-auth/prepare-package.mjs`
2225
- npm release workflow: `.github/workflows/release-npm.yml`
2326
- PyPI release workflow: `.github/workflows/release-pypi.yml`
2427
- npm platform package generator: `npm/scripts/render-platform-package.cjs`
@@ -27,6 +30,36 @@ Use these files as the release source of truth:
2730
- PyPI package metadata: `pypi/pyproject.toml`
2831
- PyPI package README: `pypi/README.md`
2932

33+
## Version sync rules
34+
35+
The SDK npm package `@smbcloud/sdk-auth` must have its version in `sdk/npm/smbcloud-auth/package.json` match the version in `crates/smbcloud-auth-sdk-wasm/Cargo.toml` exactly. The `prepare-package.mjs` script enforces this at build time and will fail CI if they diverge.
36+
37+
When bumping workspace crate versions for a release, always update `sdk/npm/smbcloud-auth/package.json` in the same commit.
38+
39+
## Tagging discipline
40+
41+
Always tag releases on the `development` branch (the mainline). Never tag on a feature branch.
42+
43+
Reasoning:
44+
45+
- The release commit history stays clean and linear on the default branch.
46+
- `cargo workspaces publish --allow-branch "*"` accepts any branch, but downstream workflows dispatch from the tag ref, so the tagged commit must contain all intended changes.
47+
- Tagging on a feature branch leaves `development` without the release commit and makes git history confusing.
48+
49+
Workflow:
50+
51+
1. Merge the feature branch into `development` with `--no-ff`.
52+
2. Tag on `development`: `git tag v<version>`.
53+
3. Push both: `git push origin development && git push origin v<version>`.
54+
55+
If a tag was placed on the wrong commit (e.g. before a last-minute fix), move it:
56+
57+
1. Merge the fix into `development`.
58+
2. Force-move the tag: `git tag -f v<version>`.
59+
3. Force-push the tag: `git push origin v<version> --force`.
60+
61+
The `release-crate.yml` orchestrator triggers on `push.tags: "v*.*.*"`, so the force-push will re-trigger the full release chain.
62+
3063
## Release model
3164

3265
There are two public distribution channels.

0 commit comments

Comments
 (0)