Skip to content

Targets Overview

Targets define where Craft publishes your release artifacts. Configure them in .craft.yml under the targets key.

Target Description
GitHub Create GitHub releases and tags
Commit on Git Repository Push to a git repository
Target Description
NPM Publish to NPM registry
PyPI Publish to Python Package Index
Crates Publish Rust crates
NuGet Publish .NET packages
Ruby Gems Publish Ruby gems
Maven Publish to Maven Central
Hex Publish Elixir packages
pub.dev Publish Dart/Flutter packages
CocoaPods Publish iOS/macOS pods
PowerShell Publish PowerShell modules
UPM Publish Unity packages
Homebrew Update Homebrew formulas
MCP Registry Publish MCP servers to the official MCP Registry
Target Description
Docker Tag and push Docker images
AWS Lambda Layer Publish Lambda layers
GCS Upload to Google Cloud Storage
GitHub Pages Deploy static sites
Cloudflare Deploy static sites or Workers to Cloudflare
Vercel Deploy a prebuilt static site to Vercel
Target Description
Registry Update Sentry release registry
Symbol Collector Upload native symbols
Sentry PyPI (sentry-pypi) Import a package into Sentry’s internal PyPI
targets:
- name: npm
- name: github

These options can be applied to any target:

Option Description
includeNames Regex pattern: only matched files are processed
excludeNames Regex pattern: matched files are skipped
id Unique ID to reference this target with -t target[id]

Example:

targets:
- name: github
includeNames: /^.*\.exe$/
excludeNames: /^test.exe$/
- name: registry
id: browser

Targets run in the order they are listed.

Use the -t flag with craft publish:

Terminal window
# Publish to all targets
craft publish 1.2.3
# Publish to specific target
craft publish 1.2.3 -t npm
# Publish to target with ID
craft publish 1.2.3 -t registry[browser]
# Skip publishing (just merge branch)
craft publish 1.2.3 -t none