feat(preview-release): add action for standalone library preview releases#19
Merged
Conversation
…ases A single-package counterpart to monorepo-preview-release. Per PR it bumps the package in working_directory to <version>-git-<short-sha>, publishes it to npm under the pr-<n> dist-tag, and notifies vland-bot via OIDC. Drops the workspace machinery (pnpm list -r, PR-files change detection, internal dep resolution, octokit/github_token) and adds a working_directory input. Keeps the pull_request_target refusal, the three auth modes (token-only / oidc-with-token-fallback / oidc-only), and the vland-bot notification identical to the monorepo action. 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
Adds a new Node action
preview-release— the standalone-library counterpart tomonorepo-preview-release. It targets repos that publish a single npm package (not a pnpm workspace).Per PR it:
working_directory(default repo root) to<version>-git-<short-sha>viapnpm version prerelease.pr-<n>dist-tag viapnpm publish.vland-bot(GitHub OIDC,vland-botaudience) so it can comment the published version on the PR.Differences vs.
monorepo-preview-releaseSince there's only one package, all the workspace machinery is removed:
pnpm list -r), PR-files change detection, internal dependency resolution, and theoctokit/github_tokeninput (no PR-files API call anymore).working_directoryinput (default".") for libraries living in a subdirectory.Kept identical (parity)
pull_request_target.token-only/oidc-with-token-fallback/oidc-only, including the first-publishNPM_TOKENfallback without provenance.~/.npmrcauth wrapping +core.setSecretmasking.vland-botendpoint and payload (/v1/github/preview-release).Inputs
npm_tokenworking_directory.vland_bot_urlhttps://bot.variable.landVerification
tsc --noEmit✓biome check(viarr check) ✓ — 6 files, no fixesncc build✓ —dist/index.jscommitted and deterministic (rebuild is a no-op)README.mdactions table updated🤖 Generated with Claude Code