mkcode/Wrangler Version Deploy Action with Metadata

Deploy Cloudflare Workers using Wrangler v4's Versions API while attaching rich metadata to each deployment.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
api_tokenCloudflare API token. Pass via secrets (e.g. secrets.CLOUDFLARE_API_TOKEN).yes
wrangler_commandCommand used to invoke Wrangler (for example: wrangler, npx wrangler, pnpm dlx wrangler@4).yes
working_directoryWorking directory from which Wrangler commands will be executed (useful for monorepos).no
configOptional path to the Wrangler configuration file (e.g. wrangler.toml or dist/server/wrangler.json). When provided, this will be passed as --config to both versions upload and versions deploy. If omitted, Wrangler's default config resolution is used.no
upload_argsAdditional arguments passed only to wrangler versions upload (excluding --config). Example: --env productionno
deploy_argsAdditional arguments passed only to wrangler versions deploy (excluding --config). Example: --env productionno
message_templateTemplate for a deployment message derived from CI and deployment metadata. Supports variables like: {{owner}}, {{repo}}, {{branch}}, {{ref}}, {{sha}}, {{short_sha}}, {{actor}}, {{run_id}}, {{run_number}}, {{commit_message}}, {{short_commit_message}}, {{deployment_url}}, {{version_id}}. If not provided, a sensible default based on branch, commit, and message is used. The same message is applied for both upload and deploy. no
tag_templateTemplate for a deployment tag/label derived from CI and deployment metadata. Supports the same variables as message_template. If not provided, no tag is generated by default. no
only_uploadIf set to true, run only `wrangler versions upload` with the rendered message and provided config/args, output the parsed Worker Version ID if available, and exit without running `wrangler versions deploy`. When true, failure to parse a version ID will not cause the action to fail. nofalse
namedescription
deployment_urlThe URL of the deployed resource, if detected from Wrangler output.
version_idThe deployed version ID or similar identifier, if detected from Wrangler output.
messageThe rendered deployment message from message_template (if provided).
tagThe rendered deployment tag from tag_template (if provided).