grind_publish 0.0.5 grind_publish: ^0.0.5 copied to clipboard
A library to automatically publish a package when its version increases.
import 'package:grinder/grinder.dart';
import 'package:grind_publish/grind_publish.dart' as grind_publish;
@Task('Automatically publishes this package if the pubspec version increases')
autoPublish() async {
// Will use the `ACCESS_TOKEN`, `REFRESH_TOKEN` and `EXPIRATION` env vars
// as a configuration.
final credentials = grind_publish.Credentials.fromEnvironment();
await grind_publish.autoPublish('your-package-name', credentials);
}