feat: publish a prebuilt tarball on release#20
Merged
Conversation
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>
4 tasks
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
"files": ["dist"]topackage.jsonsopnpm pack/npm packincludes the compiled output.dist/is gitignored, so without this the packed tarball would be empty.Releaseworkflow that, on each published GitHub release, builds → packs → attachesexpost-<version>.tgzas a release asset.Why
Consumers (beeminder/blog) currently install expost as a git dependency (
github:bsoule/expost#<sha>), which runs expost'sprepare(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:
The tarball already contains built
dist/, so no install-timetsc, 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 packproducesexpost-1.0.0.tgzcontainingpackage/dist/**+package.json+README.md. Confirmeddist/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 attachesexpost-1.0.0.tgz, and the blog-side PR (beeminder/blog#762) can point its dependency at that URL.🤖 Generated with Claude Code