Skip to content

ci: automate release - #10

Merged
Kikobeats merged 3 commits into
v11from
automation
Sep 17, 2026
Merged

Kikobeats merged 3 commits into
v11from
automation

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Releases @kikobeats/got from CI, using automate-release's layout while keeping got's own toolchain (xo, TypeScript 4.0 build, ava 3, nyc).

What changed from the automate-release defaults

automate-release here why
devDependencies and test: c8 ava replaced got's package.json kept as-is, release tooling added the TypeScript build, xo and the 552-test suite depend on it
pnpm, master npm, v11 the fork publishes from v11 and pins dev deps with npm install --before
conventional-changelog conventional-changelog-cli the pinned (2021) conventional-changelog has no CLI
github-generate-release devDependency npx -y github-generate-release first published 2024, so the 2021 pin can't install it
nano-staged pre-commit (standard) no pre-commit hook; commitlint on commit-msg nano-staged also postdates the pin, and the fork lints TypeScript with xo
contributors job none git-authors-cli would rewrite contributors from upstream got's history
Coveralls upload nyc text report in the log the fork isn't set up on Coveralls

Files

  • package.json: scripts release, postrelease and release:* (standard-version bump, CHANGELOG.md, chore(release): x.y.z commit, tag, git push origin HEAD:v11 --follow-tags, GitHub release, ci-publish || npm publish). np removed; commitlint + simple-git-hooks added.
  • .github/actions/install: got's pinned install, shared by every job. Runtime deps are removed for the pinned step so aliases newer than the pin (fix: depend on @kikobeats/cacheable-request #9) still resolve.
  • pull_request.yml: Lint runs npx xo on Node 22 (xo 0.34 calls util.isDate, removed in Node 23), plus a build + nyc ava matrix on lts/* and latest. Also callable from main.yml.
  • main.yml: on push to v11, runs pull_request.yml, then npm run release. Skipped for chore(release):, docs: and ci: commits.
  • test.yml: removed, replaced by the two workflows above.
  • dependabot.yml: target-branch: v11, since the default branch master is got 6.
  • test/helpers/invalid-url.ts: import * as test from 'ava', like the other helpers. Fixes xo's ava/use-test error.

Tested

  • CI: Lint passes on Node 22.23.2; Node 24.20.0 and 26.9.0 each report 552 passed, 1 known failure, 2 skipped, 97.3% statement coverage.
  • Replayed the release scripts against a local bare origin on top of v11: 11.8.8 → 11.8.9, CHANGELOG.md created, chore(release): 11.8.9 commit, tag v11.8.9, both pushed. The GitHub release and npm publish weren't run.

Before merging

🤖 Generated with Claude Code


Note

Medium Risk
Automated npm publish and git tagging on every qualifying v11 push depend on secrets and commit-message skips; workflow mistakes could ship unintended versions.

Overview
Adds CI-driven releases on pushes to v11: lint (xo on Node 22) and build/test (nyc + ava on LTS/latest) run via reusable pull_request.yml, then a release job runs npm run release unless the commit is chore(release):, docs:, or ci:.

Release tooling drops np in favor of standard-version, changelog generation, git tag/push to v11, GitHub release (github-generate-release), and npm publish (ci-publish fallback). commitlint + simple-git-hooks validate commit messages locally.

Shared composite install action centralizes the pinned dev-deps + latest-in-range runtime install (replacing inline steps from the old test.yml). Dependabot targets v11 for npm and GitHub Actions (Actions limited to major bumps). Minor test helper change: invalid-url.ts uses import * as test from 'ava' for xo.

Reviewed by Cursor Bugbot for commit 0157579. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores

    • Added automated dependency update configuration.
    • Added standardized workflows for pull request checks, linting, builds, tests, and releases across supported Node.js versions.
    • Added automated versioning, changelog generation, tagging, publishing, and commit-message validation.
  • Refactor

    • Replaced the previous release tooling with explicit release automation scripts.
  • Bug Fixes

    • Updated test helper typing for compatibility with the current test framework.
  • Chores

    • Disabled the scheduled cron workflow and removed the previous standalone test workflow.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 52e1c9b0-b286-4fb8-b1d3-d66c4405cb08

📥 Commits

Reviewing files that changed from the base of the PR and between 4767219 and 529200f.

📒 Files selected for processing (8)
  • .github/actions/install/action.yml
  • .github/dependabot.yml
  • .github/workflows/cron.yml
  • .github/workflows/main.yml
  • .github/workflows/pull_request.yml
  • .github/workflows/test.yml
  • package.json
  • test/helpers/invalid-url.ts
 ___________________________________________________________________________________________
< Optimism is an occupational hazard of programming; feedback is the treatment. - Kent Beck >
 -------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

Keeps got's scripts, TypeScript build, xo, ava 3 and nyc instead of the
automate-release defaults, and releases from v11 with npm:

- package.json: got's original file plus the release scripts, commitlint
  and simple-git-hooks (commit-msg only). np is replaced by
  standard-version, conventional-changelog-cli and ci-publish.
  github-generate-release runs through npx because it postdates the
  2021-06-15 dev dependency pin. nano-staged is left out for the same
  reason.
- .github/actions/install: got's pinned dev dependency install, shared by
  every job. It installs without runtime dependencies so aliases newer
  than the pin still resolve in the next step.
- pull_request.yml: xo on Node.js 22 (xo 0.34 calls util.isDate, removed
  in Node.js 23) and the lts/latest build + nyc ava matrix. Also callable
  from main.yml.
- main.yml: on push to v11, runs pull_request.yml, then npm run release.
  No contributors job: git-authors-cli would rewrite the contributors list
  from upstream got's history.
- test.yml is removed; pull_request.yml and main.yml replace it.
- test/helpers/invalid-url.ts imports ava the way the other helpers do,
  fixing xo's ava/use-test error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Kikobeats
Kikobeats marked this pull request as ready for review September 17, 2026 14:05
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Kikobeats Kikobeats changed the title chore: first try ci: automate release Sep 17, 2026
@Kikobeats
Kikobeats merged commit 3f1aeaf into v11 Sep 17, 2026
4 checks passed
@Kikobeats
Kikobeats deleted the automation branch September 17, 2026 14:13
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