You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: automate releases with uppt and npm trusted publishing - #562
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
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.
Merging it tags vX.Y.Z, creates the GitHub release from the PR body, and dispatches the publish run.
pack (no permissions) installs with --ignore-scripts, runs pnpm build, then pnpm packs each package.
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.
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.
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.
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:*.
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: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely summarizes the main changes: automated releases with uppt and npm trusted publishing.
Docstring Coverage
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases currently run locally:
pnpm releasecalls 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
mainopens or updates a draftrelease/vX.Y.ZPR titledchore: release vX.Y.Z. It bumps all 8 packages inpackages/*to one shared version (lockstep, as the old root.release-it.jsondid) and lists conventional commits since the lastv*tag. Edit the PR to tweak notes or the version.vX.Y.Z, creates the GitHub release from the PR body, and dispatches the publish run.pack(no permissions) installs with--ignore-scripts, runspnpm build, thenpnpm packs each package.publish(id-token: writeonly,npmenvironment) stages every tarball withnpm stage publish. Approve them on npmjs.com.Prereleases:
gh workflow run release.yml -f prerelease=beta.Changes
.github/workflows/release.yml, with uppt pinned to v0.6.12 by SHA.packbuilds the whole workspace before uppt packs, instead of using uppt's built-in install. With scripts skipped, nodist/exists, framework packages compile against comark'sdist,@comark/sveltehas noprepack, and the plugin re-exports come fromsync-plugins.@comark/nuxtdepends on@comark/vueviaworkspace:*instead ofcatalog:. 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'sprepackcopiesdocs/skillsinto the package (previously a release-it hook).scripts/release.mjs, every.release-it.json, thereleasescripts and dev dependencies, the unused@comark/*catalog entries, and the per-packageCHANGELOG.mdfiles (release notes live in GitHub Releases).Verification
scripts/pack.ts(v0.6.12) on a clean copy afterpnpm 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;comarkincludesskills/, and@comark/nuxtresolves to"@comark/vue": "0.8.1".comark,@comark/htmland@comark/vuetarballs in an empty project;renderHtml('# Hi **there** https://x.dev')rendered correctly and@comark/vue/plugins/linkifyimported.actionlint,oxfmt --checkandpnpm typecheckpass. The release workflow itself has not run yet.Setup before merging
v0.8.1tag at the last 0.8.1 release commit, otherwise the first release PR lists every commit since the repo started (only<name>@0.8.1tags exist):git tag v0.8.1 1003f5c && git push origin v0.8.1.comark,@comark/angular,@comark/ansi,@comark/html,@comark/nuxt,@comark/react,@comark/svelteand@comark/vue, add a trusted publisher: GitHub Actions,comarkdown/comark, workflowrelease.yml, environmentnpm, with thenpm stage publishpermission.npmenvironment (if refs are restricted, allowv*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