Skip to content

feat(preview-release): add action for standalone library preview releases#19

Merged
rqbazan merged 1 commit into
mainfrom
feat/preview-release-action
Jun 27, 2026
Merged

feat(preview-release): add action for standalone library preview releases#19
rqbazan merged 1 commit into
mainfrom
feat/preview-release-action

Conversation

@rqbazan

@rqbazan rqbazan commented Jun 27, 2026

Copy link
Copy Markdown
Member

What

Adds a new Node action preview-release — the standalone-library counterpart to monorepo-preview-release. It targets repos that publish a single npm package (not a pnpm workspace).

Per PR it:

  1. Bumps the package in working_directory (default repo root) to <version>-git-<short-sha> via pnpm version prerelease.
  2. Publishes it to npm under the pr-<n> dist-tag via pnpm publish.
  3. Notifies vland-bot (GitHub OIDC, vland-bot audience) so it can comment the published version on the PR.

Differences vs. monorepo-preview-release

Since there's only one package, all the workspace machinery is removed:

  • Dropped: workspace enumeration (pnpm list -r), PR-files change detection, internal dependency resolution, and the octokit / github_token input (no PR-files API call anymore).
  • Added: a working_directory input (default ".") for libraries living in a subdirectory.

Kept identical (parity)

  • Refusal to run on pull_request_target.
  • The three auth modes: token-only / oidc-with-token-fallback / oidc-only, including the first-publish NPM_TOKEN fallback without provenance.
  • Transient ~/.npmrc auth wrapping + core.setSecret masking.
  • Same vland-bot endpoint and payload (/v1/github/preview-release).

Inputs

Input Required Default
npm_token no
working_directory no .
vland_bot_url no https://bot.variable.land

Verification

  • tsc --noEmit
  • biome check (via rr check) ✓ — 6 files, no fixes
  • ncc build ✓ — dist/index.js committed and deterministic (rebuild is a no-op)
  • Root README.md actions table updated

🤖 Generated with Claude Code

…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>
@rqbazan rqbazan merged commit c9e8eb1 into main Jun 27, 2026
1 check passed
@rqbazan rqbazan deleted the feat/preview-release-action branch June 27, 2026 22:47
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