pub_release 11.9.0 copy "pub_release: ^11.9.0" to clipboard
pub_release: ^11.9.0 copied to clipboard

Automates the release of a dart package to pub.flutter-io.cn including running dartfmt, creating a git tag, incrementing the packages version no. and pushing the package to pub.flutter-io.cn.

README #

Pub Release is a package that automates publishing dart/flutter packages to pub.flutter-io.cn.

Pub Release also supports the simultaneous release of multiple related packages.

Pub Release performs the following operations:

  • Run pre/post release 'hook' scripts.
  • Formats all code using dartfmt
  • Increments the version no. using semantic versioning after asking what sort of changes have been made.
  • Creates a dart file containing the version no. in src/version/version.g.dart
  • Updates the pubspec.yaml with the new version no.
  • If you are using Git:
    • Generates a Git Tag using the new version no.
    • Generates release notes from commit messages since the last tag.
    • Publish any executables list in pubspec.yaml as assets on github
  • Allows you to edit the release notes.
  • Adds the release notes to CHANGELOG.MD along with the new version no.
  • Publishes the package to pub.flutter-io.cn.

Getting Started #

Install Pub Release globally:

dart pub global activate pub_release

Run it from your package root:

pub_release

Read the full documentation to learn how to use it.

Common Workflows #

Dry-run a release (no publish):

pub_release --dry-run

Set a specific version and skip prompts:

pub_release --setVersion=1.2.3 --autoAnswer

Run multi-package release in a mono-repo:

pub_release multi

Dry Run #

Use --dry-run to validate a release without publishing. During a dry run, pub_release performs the publish step inside a temporary copy of your package to avoid git working tree warnings while still validating the generated version and changelog.

If you need to allow warnings from dart pub publish, pass --ignore-warnings.

Commands #

  • pub_release - release a single package (default).
  • pub_release multi - release related packages using tool/pubrelease.multi.yaml.
  • pub_release help - show usage.

Flags #

  • --dry-run - validate but do not publish.
  • --ignore-warnings - pass --ignore-warnings to dart pub publish.
  • --[no]-test - enable/disable unit tests (default: on).
  • --line=<n> - formatter line length (default: 80).
  • --[no]-format - enable/disable formatting (default: on).
  • --verbose - enable verbose logging.
  • --git - enable git operations (default: on).
  • --no-multi - disable multi-release even if a multi config exists.
  • --askVersion - prompt for version (default).
  • --setVersion=<x.y.z> - set version directly.
  • --autoAnswer - suppress prompts (requires --setVersion).
  • --tags=<tag,...> - only run tests matching tags.
  • --exclude-tags=<tag,...> - exclude tests by tag.
  • --skip-packages=<name,...> - skip named packages when running the multi command.

Multi Release Notes #

When using pub_release multi, the first package that generates a changelog entry will have its release notes propagated to the other packages unless they already contain notes for that version.

22
likes
0
points
1.11k
downloads

Documentation

Documentation

Publisher

verified publisheronepub.flutter-io.cn

Weekly Downloads

Automates the release of a dart package to pub.flutter-io.cn including running dartfmt, creating a git tag, incrementing the packages version no. and pushing the package to pub.flutter-io.cn.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, dcli, dcli_core, github, meta, mime, path, pub_semver, pubspec_manager, settings_yaml

More

Packages that depend on pub_release