Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 23, 2026

Summary

Improves the Craft onboarding experience by reducing the trial-and-error typically required to set up Craft for a new project.

New Commands

  • craft init: Auto-detects project type and generates configuration

    • Detects targets: npm, pypi, crates, docker, gem, pub-dev, github
    • Generates .craft.yml with smart defaults (minVersion: 2.20.0)
    • Creates GitHub Actions workflows (release.yml, publish.yml, changelog-preview.yml)
    • Detects Node.js setup (package manager, version file)
    • Detects Python setup (version from .python-version or pyproject.toml)
  • craft validate: Validates configuration and workflows

    • Checks YAML syntax and schema validation
    • Validates target names and duplicate IDs
    • Validates regex patterns in includeNames/excludeNames
    • Warns about deprecated fields and missing best practices
    • Validates GitHub workflow files

Smart Defaults

When minVersion >= 2.20.0:

  • changelog.policy defaults to auto (was none)
  • versioning.policy defaults to auto when >= 2.14.0 (was manual)

First Release Improvements

  • Defaults to version 0.1.0 when no git tags exist
  • Automatically creates CHANGELOG.md when using auto changelog policy

Documentation

  • Updated getting-started guide with craft init quick start
  • Documented smart defaults behavior in configuration reference
  • Added first release workflow guide

Add new commands and features to improve the onboarding experience:

- craft init: Auto-detect project type and generate configuration
  - Detects npm, pypi, crates, docker, gem, pub-dev targets
  - Generates .craft.yml with smart defaults
  - Creates GitHub Actions workflows (release, publish, changelog-preview)

- craft validate: Validate configuration and workflows
  - Checks YAML syntax and schema
  - Validates target names and regex patterns
  - Warns about deprecated fields and missing best practices

- Smart defaults for minVersion >= 2.20.0
  - changelog.policy defaults to 'auto'
  - versioning.policy defaults to 'auto' (>= 2.14.0)

- First release improvements
  - Defaults to version 0.1.0 when no tags exist
  - Creates CHANGELOG.md automatically with auto policy

- Documentation updates for all new features
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://getsentry.github.io/craft/pr-preview/pr-732/

Built to branch gh-pages at 2026-01-23 13:57 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

craft init

# Auto-determine version from conventional commits
craft prepare auto
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
craft prepare auto
craft prepare


const latestTag = await getLatestTag(git);

// Handle first release (no existing tags)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this logic be merged with the part that says // Calculate new version from latest tag below?

- Fix docs: Change 'craft prepare auto' to 'craft prepare' in quick example
- Merge first release logic with version calculation:
  - Use default bump type (minor) instead of hardcoded version
  - Allow explicit bump types to work for first release (e.g., major -> 1.0.0)
  - More consistent code flow
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.

2 participants