grind_publish 0.0.1 grind_publish: ^0.0.1 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. If you want to name them differently, you can configure
// `.fromEnvironment()`.
final credentials = grind_publish.Credentials.fromEnvironment();
grind_publish.autoPublish('your-package-name', credentials);
}