invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.08k stars 193 forks source link

feat: Add lifecycle hooks for `publish` #656

Closed spydon closed 4 months ago

spydon commented 4 months ago

Description

This PR adds lifecycle hooks (pre and post) to the publish command. It runs pre once before publishing runs and post once afterwards (even though several packages might be published).

It also runs in --dry-run mode, to better emulate a real publish. The environment variable MELOS_PUBLISH_DRY_RUN is introduced so that the user can know whether it is in dry-run mode or not in the scripts.

Type of Change