Skip to content

ci: automate releases with uppt and npm trusted publishing - #562

Merged
farnabaz merged 2 commits into
mainfrom
ci/uppt-release
Nov 5, 2026
Merged

farnabaz merged 2 commits into
mainfrom
ci/uppt-release

Conversation

@atinux

@atinux atinux commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Written by an AI agent on behalf of @atinux. @atinux has not reviewed it yet.

Releases currently run locally: pnpm release calls release-it once per package, waits for npm, bumps the @comark/* catalog entries and commits again. This PR moves releasing to danielroe/uppt, the same flow as nuxt-auth-utils, with npm trusted publishing (OIDC) and staged approval.

How releasing works

  1. Every push to main opens or updates a draft release/vX.Y.Z PR titled chore: release vX.Y.Z. It bumps all 8 packages in packages/* to one shared version (lockstep, as the old root .release-it.json did) and lists conventional commits since the last v* tag. Edit the PR to tweak notes or the version.
  2. Merging it tags vX.Y.Z, creates the GitHub release from the PR body, and dispatches the publish run.
  3. pack (no permissions) installs with --ignore-scripts, runs pnpm build, then pnpm packs each package.
  4. publish (id-token: write only, npm environment) stages every tarball with npm stage publish. Approve them on npmjs.com.

Prereleases: gh workflow run release.yml -f prerelease=beta.

Changes

  • Add .github/workflows/release.yml, with uppt pinned to v0.6.12 by SHA.
  • pack builds the whole workspace before uppt packs, instead of using uppt's built-in install. With scripts skipped, no dist/ exists, framework packages compile against comark's dist, @comark/svelte has no prepack, and the plugin re-exports come from sync-plugins.
  • @comark/nuxt depends on @comark/vue via workspace:* instead of catalog:. Otherwise a 0.9.0 release would publish @comark/vue: ^0.8.1, which excludes 0.9.0. Locally it now links the workspace copy instead of the npm one.
  • comark's prepack copies docs/skills into the package (previously a release-it hook).
  • Remove release-it: scripts/release.mjs, every .release-it.json, the release scripts and dev dependencies, the unused @comark/* catalog entries, and the per-package CHANGELOG.md files (release notes live in GitHub Releases).
  • AGENTS.md describes the new flow.

Verification

  • Ran uppt's scripts/pack.ts (v0.6.12) on a clean copy after pnpm install --frozen-lockfile --ignore-scripts && pnpm build: it packed all 8 tarballs. Compared to the published 0.8.1 tarballs, the only missing files are sources moved since 0.8.1; comark includes skills/, and @comark/nuxt resolves to "@comark/vue": "0.8.1".
  • Installed the comark, @comark/html and @comark/vue tarballs in an empty project; renderHtml('# Hi **there** https://x.dev') rendered correctly and @comark/vue/plugins/linkify imported.
  • actionlint, oxfmt --check and pnpm typecheck pass. The release workflow itself has not run yet.

Setup before merging

  • Push a v0.8.1 tag at the last 0.8.1 release commit, otherwise the first release PR lists every commit since the repo started (only <name>@0.8.1 tags exist): git tag v0.8.1 1003f5c && git push origin v0.8.1.
  • npmjs.com: on comark, @comark/angular, @comark/ansi, @comark/html, @comark/nuxt, @comark/react, @comark/svelte and @comark/vue, add a trusted publisher: GitHub Actions, comarkdown/comark, workflow release.yml, environment npm, with the npm stage publish permission.
  • GitHub: create an npm environment (if refs are restricted, allow v* tags), and enable "Allow GitHub Actions to create and approve pull requests".

ELI5

Instead of a maintainer running a release script on their laptop, GitHub now keeps a "next release" PR up to date. Merging it publishes every package to npm, and a maintainer approves it there before it goes live.

Summary by CodeRabbit

  • New Features
    • Releases now use coordinated versioning across packages, with draft version-bump pull requests created from updates to the main branch.
    • Merging a release pull request creates a shared tag and GitHub release, then starts package publishing.
    • Manual releases can publish packages with a specified distribution tag, including beta prereleases. Packages are staged for publication, with approval required before staged versions go live.
  • Documentation
    • Updated release guidance to explain the coordinated versioning, release, and publishing process.

@atinux
atinux requested a review from farnabaz as a code owner November 5, 2026 16:33
@coldtea-pr-lens

Copy link
Copy Markdown

Note

The title starts with ci:, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
comark Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-binding Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-json-render Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-nextjs Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-nuxt Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-svelte Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-sveltekit Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-twoslash Ready Ready Preview Nov 5, 2026 4:52pm UTC
comark-vue Ready Ready Preview Nov 5, 2026 4:52pm UTC

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The pull request adds a GitHub Actions release workflow for lockstep versioning, release creation, package packing, and staged npm publishing. It removes the per-package release-it setup, its changelogs, and the release orchestrator.

Changes: Lockstep release process

Layer / File(s) Summary
Draft release PR automation
.github/workflows/release.yml, AGENTS.md
The workflow adds configured triggers and invokes the PR action for eligible pushes and manual dispatches. The CI workflow table and release instructions describe the release workflow.
Release, pack, and publish
.github/workflows/release.yml, packages/comark/package.json, test/bundle.test.ts, AGENTS.md
Merged release PRs invoke the release action. Manual dispatches on version tags build and pack packages, then publish non-empty pack output using OIDC and the supplied npm tag. The core package build copies the skills directory before compilation. The bundle size and file-count snapshot is updated.
Remove per-package release tooling
.release-it.json, scripts/release.mjs, package.json, pnpm-workspace.yaml, AGENTS.md, packages/*/.release-it.json, packages/*/CHANGELOG.md, packages/*/package.json
Per-package release configurations, changelogs, release scripts, and the release orchestrator are removed. Release-it dependencies and related workspace catalog entries are removed. The Nuxt package changes its Vue dependency from catalog: to workspace:*.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Actions
  participant PackJob
  participant PublishJob
  participant Npm
  Actions->>PackJob: Dispatch on a v* tag
  PackJob->>PackJob: Build workspace and pack packages/*
  PackJob->>PublishJob: Pass packed-file list
  PublishJob->>Npm: Publish packed files using OIDC and npm tag
Loading
Merge Risk: Minimal · up to 9016c

The release automation and package changes show no established merge-blocking problem. The new build step uses Unix-only copy commands, which could inconvenience contributors building on native Windows, but the repository does not declare Windows support. Complete the listed npm trusted-publisher and environment setup before relying on the workflow.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely summarizes the main changes: automated releases with uppt and npm trusted publishing.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Replace release-it with danielroe/uppt: a lockstep release PR, tag and
GitHub release on merge, and staged npm publish over OIDC.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1ac63-4516-75b8-8175-f71fb7ac610b
@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark

npm i https://pkg.pr.new/comark@562

@comark/angular

npm i https://pkg.pr.new/@comark/angular@562

@comark/ansi

npm i https://pkg.pr.new/@comark/ansi@562

@comark/html

npm i https://pkg.pr.new/@comark/html@562

@comark/nuxt

npm i https://pkg.pr.new/@comark/nuxt@562

@comark/react

npm i https://pkg.pr.new/@comark/react@562

@comark/svelte

npm i https://pkg.pr.new/@comark/svelte@562

@comark/vue

npm i https://pkg.pr.new/@comark/vue@562

commit: 9016cd1

@codspeed

codspeed Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 3 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 43 untouched benchmarks


Comparing ci/uppt-release (9016cd1) with main (6618859)

Open in CodSpeed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional comments: 1

packages/comark/package.json-67-67: 1

67-67: Major · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Use cross-platform commands to copy skills.

On Windows, pnpm’s default shell cannot run rm or cp. This blocks pnpm build and pnpm prepack for Windows contributors. Use a Node.js copy script instead. (pnpm.io)

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53f376e8-b52b-4335-aa06-2636339c91ee
Commits

Reviewing files that changed from the base of the PR and between 14bfcae and 9016cd1.

Files selected for processing: 3

  • AGENTS.md
  • packages/comark/package.json
  • test/bundle.test.ts
Files skipped from review as they are similar to previous changes: 1

  • AGENTS.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@farnabaz farnabaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, Thanks

@farnabaz
farnabaz merged commit 439c6f0 into main Nov 5, 2026
17 checks passed
@farnabaz
farnabaz deleted the ci/uppt-release branch November 5, 2026 19:18
@github-actions github-actions Bot mentioned this pull request Nov 5, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Nov 18, 2026

This branch was successfully deployed

8 active deployments
Preview – comark-nuxt — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-sveltekit — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-twoslash — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-json-render — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-vue — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-binding — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-nextjs — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
Preview – comark-svelte — 9016cd1b Deployed Nov 5, 2026 by vercel[bot]
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.

2 participants