grind_publish 0.0.2 copy "grind_publish: ^0.0.2" to clipboard
grind_publish: ^0.0.2 copied to clipboard

outdated

A library to automatically publish a package when its version increases.

grind_publish #

This package automatically publishes your library when the pubspec.yaml version has been increased and merged into master.

Usage #

1. Setup the grind task like this: #

@Task('Automatically publishes this package if the pubspec version increases')
autoPublish() async {
  final credentials = Credentials.fromEnvironment();
  grind_publish.autoPublish('your-package-name', credentials);
}

2. Set the environmental variables in your CI runner #

By default the env vars are named: ACCESS_TOKEN, REFRESH_TOKEN, EXPIRATION, TOKEN_ENDPOINT (optional), SCOPES (optional).

You find the values on your local machine in ~/.pub-cache/credentials.json after you once ran pub publish.

3. Run the script in your CI pipeline #

This really depends on where you are running this. For GitLab example, simply look at this .gitlab-ci.yml.

1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A library to automatically publish a package when its version increases.

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

Dependencies

grinder, http, meta, path

More

Packages that depend on grind_publish