Skip to content

feat: publish a prebuilt tarball on release#20

Merged
narthur merged 3 commits into
masterfrom
feat/release-tarball
Jul 15, 2026
Merged

feat: publish a prebuilt tarball on release#20
narthur merged 3 commits into
masterfrom
feat/release-tarball

Conversation

@narthur

@narthur narthur commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What

  • Add "files": ["dist"] to package.json so pnpm pack/npm pack includes the compiled output. dist/ is gitignored, so without this the packed tarball would be empty.
  • Add a Release workflow that, on each published GitHub release, builds → packs → attaches expost-<version>.tgz as a release asset.

Why

Consumers (beeminder/blog) currently install expost as a git dependency (github:bsoule/expost#<sha>), which runs expost's prepare (tsc) at install time. That build needs expost's devDeps, so it breaks under production-mode installs and cold caches — e.g. Render PR previews fail while the warm prod cache silently reuses a previously-built copy. See beeminder/blog#656.

With this PR, consumers can install from the release asset URL:

"expost": "https://github.com/bsoule/expost/releases/download/v1.0.0/expost-1.0.0.tgz"

The tarball already contains built dist/, so no install-time tsc, no devDeps, cold-safe and prod-safe. Release assets on a public repo download anonymously, so no token is needed anywhere (unlike GitHub Packages).

Verification

Locally: pnpm run build && pnpm pack produces expost-1.0.0.tgz containing package/dist/** + package.json + README.md. Confirmed dist/ is present in the tarball.

How to cut the first release

After merge, publish a GitHub release (e.g. tag v1.0.0). The workflow attaches expost-1.0.0.tgz, and the blog-side PR (beeminder/blog#762) can point its dependency at that URL.

🤖 Generated with Claude Code

Add `files: ["dist"]` so `pnpm pack` ships the compiled output (dist/ is
gitignored, so without this the tarball would be empty), and a Release
workflow that builds, packs, and attaches expost-<version>.tgz to each
published GitHub release.

Consumers can then install expost from the release asset URL instead of
as a git dependency, so they never run the install-time `tsc` build.
That fixes cold builds (e.g. Render PR previews) and needs no token,
since release assets on a public repo download anonymously.

See beeminder/blog#656.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
narthur and others added 2 commits July 15, 2026 07:45
Trigger the Release workflow on every push to master. The version is
auto-computed from git tags via semver-action (patch bump when there's
no conventional-commit signal), so nothing needs hand-editing — merge
to master and a release with the prebuilt tarball is cut. Mirrors the
approach in PinePeakDigital/buzz.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
etherpad/expost.js is a vendored WordPress/browser jQuery snippet, not
part of the shipped package (files:[dist] excludes it). It tripped
no-undef on browser globals (jQuery, document, ajaxurl), which was
failing lint on master too. Ignore the directory so lint reflects the
package's own source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@narthur
narthur merged commit 2c5fb8d into master Jul 15, 2026
2 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