Skip to content

Commit d808acd

Browse files
Merge pull request #196 from InsForge/docs/fix-release-workflow-trigger
docs: publish workflow triggers on GitHub Release, not tag push
2 parents cea91ce + 67a6478 commit d808acd

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

.claude/skills/cli-development/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: cli-development
3-
description: Use when working on the @insforge/cli codebase itself — adding or modifying commands under src/commands/, touching src/lib/api or src/lib/analytics, changing package.json version, wiring telemetry, or preparing an npm release. Covers code conventions, PostHog analytics, agent-skills sync, and the tag-triggered publish workflow.
3+
description: Use when working on the @insforge/cli codebase itself — adding or modifying commands under src/commands/, touching src/lib/api or src/lib/analytics, changing package.json version, wiring telemetry, or preparing an npm release. Covers code conventions, PostHog analytics, agent-skills sync, and the release-triggered publish workflow.
44
license: Apache-2.0
55
metadata:
66
organization: InsForge
@@ -17,8 +17,8 @@ in the repo root. It covers:
1717
property allow-list, flushing in `finally`, build-time key injection.
1818
3. **Agent-skills sync** — when to update the `InsForge/agent-skills` repo
1919
alongside CLI command changes.
20-
4. **Release workflow** — version bump → merge → tag `vX.Y.Z` → push → GitHub
21-
Actions publishes to npm.
20+
4. **Release workflow** — version bump → merge → publish a GitHub Release for
21+
`vX.Y.Z` → GitHub Actions publishes to npm.
2222

2323
Always read `DEVELOPMENT.md` before editing files under `src/`, touching
2424
`package.json` version, or shipping a release.

DEVELOPMENT.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ npm pack --dry-run
106106

107107
Releases are fully automated via GitHub Actions
108108
([`.github/workflows/publish.yml`](.github/workflows/publish.yml)).
109-
The CLI is published to npm as `@insforge/cli` whenever a version tag is
110-
pushed.
109+
The CLI is published to npm as `@insforge/cli` whenever a GitHub Release is
110+
published.
111111

112112
**Steps to ship a release:**
113113

@@ -116,14 +116,17 @@ pushed.
116116
additive features, major for breaking changes.
117117
2. **Commit the bump** with a message like `chore: bump version to X.Y.Z`.
118118
3. **Merge to `main`** via PR as usual.
119-
4. **Create and push a tag** matching the version on `main`:
119+
4. **Create and publish a GitHub Release** for the version tag on `main`:
120120
```bash
121121
git checkout main && git pull
122-
git tag vX.Y.Z
123-
git push origin vX.Y.Z
122+
gh release create vX.Y.Z --title vX.Y.Z --generate-notes
124123
```
125-
5. The `publish` workflow triggers on the tag push and:
126-
- Runs `npm run build` with `POSTHOG_API_KEY` injected from repo secrets.
124+
`gh release create` creates the tag and the release in one step. Note that
125+
pushing a bare tag (`git push origin vX.Y.Z`) does **not** trigger the
126+
workflow — it only fires when a GitHub Release is published for the tag.
127+
5. The `publish` workflow triggers on the release being published and:
128+
- Runs `npm run lint`, then `npm run build` with `POSTHOG_API_KEY`
129+
injected from repo secrets.
127130
- Runs `npm publish --access public` with `NPM_TOKEN` from repo secrets.
128131
6. **Verify** the new version appears on
129132
[npmjs.com/package/@insforge/cli](https://www.npmjs.com/package/@insforge/cli)

0 commit comments

Comments
 (0)