Skip to content

Add CI and release workflows - #5

Merged
devxoul merged 3 commits into
mainfrom
release-workflow
Oct 20, 2026
Merged

devxoul merged 3 commits into
mainfrom
release-workflow

Conversation

@devxoul

@devxoul devxoul commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

Ports the CI and release workflows from agent-messenger, so vibe-haptic no longer releases by hand from a local machine.

  • CI (ci.yml): runs typecheck, lint, test and build on pushes to main and on PRs. It runs on macos-latest because the native module links macOS MultitouchSupport.framework.

  • Release (release.yml, workflow_dispatch with a version input), also on macOS. It:

    • validates the version and runs checks;
    • bumps package.json, .claude-plugin/plugin.json and the README install snippet;
    • does a clean build, then commits the version files, the rebuilt native/*.node and hooks/;
    • tags the release without a v prefix and publishes to npm with --provenance;
    • creates the GitHub Release.

    The tag, npm publish and GitHub Release steps are safe to re-run, so the workflow can finish a release that is already tagged.

  • AGENTS.md: adds a Release section with version-decision rules, and deletes the manual .claude/commands/release.md so the workflow is the only release path.

  • Lint: excludes the generated hooks/haptic-hook.js bundle from Biome, because every build regenerates it with unsorted imports and breaks lint.

Setup required

npm publishing uses OIDC trusted publishing, the same as agent-messenger. Before the first run, add this repo and release.yml as a trusted publisher in the vibe-haptic package settings on npmjs.com.

Testing

  • bun run lint passes after a full bun run build, so the regenerated hook bundle no longer fails lint.
  • Both workflow files parse as valid YAML.
  • The CI workflow runs on this PR.

@typeey typeey Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Two release-recovery blockers: reruns can fail before reaching publishing, and repeated dispatches can move an already-published version’s tag. Both should be fixed before merging.

Out-of-diff findings moved from inline comments:

  • .github/workflows/release.yml:77 (RIGHT): Releasing an existing version can move its tag away from the code actually published.

git tag -f followed by git push --force overwrites the version tag. A new dispatch with the same version after subsequent commits can move the tag, while the later steps explicitly skip the already-existing npm package and GitHub release. The tag then identifies different source from the immutable published package.

Treat version tags as immutable. Fetch and verify an existing tag before making release changes; resume publication from its exact commit, or reject a conflicting release attempt rather than overwriting it.

Comment thread .github/workflows/release.yml Resolved

@typeey typeey Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Both release-recovery blockers are resolved at 601ca4d: reruns resume from the exact existing tag without another version commit or branch push, and existing version tags are no longer overwritten.

@devxoul
devxoul merged commit caa941c into main Oct 20, 2026
3 checks passed
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