publish_tools 0.1.0+1 publish_tools: ^0.1.0+1 copied to clipboard
A package for making it easy to publishing Dart/Flutter packages and cli tools.
publish_tools #
This package provides a set of Grinder tasks that make it easy to release a Dart and Flutter packages.
Getting started #
Requirements #
In able to use the GitHub
publishing features of this package your development setup must meet the following requirements:
git
must be available in your command path (most people reading this will have this requirement met, if not see - Installing Git)- you have a
GitHub
account and have setup a personal access token (see the documentation - Creating a personal access token) - The access token should have
delete_repo
,public_rep
permissions
Make sure that you .gitignore
your publish_tools.yaml
file to prevent publishing your token to GitHub
pubspec.yaml setup #
In your pubspec.yaml
the following to the dev_dependencies
section:
dev_dependencies:
...
grinder: ^0.9.2
publish_tools: ^0.1.0+1
Optionally, provide a non-default path for your configuration .yaml file: (remember to .gitignore
it)
publish_tools: tool/config.yaml
publish_tools.yaml setup #
Create a folder named tool
(which will already exist if you use the grinder
package). In this folder create you publish_tools
configuration file.
# this is a minimal config, several fields will be assigned default values
github:
repoUser: [your github user]
bearerToken: [bearer token created in GitHub]
# templates:
# - name: README.md
# type: overwrite
# - name: CHANGELOG.md
# type: prepend
commit: 'sample commit message'
Create
import 'package:grinder/grinder.dart';
import 'package:publish_tools/publish_tools.dart';
main(args) async {
PublishTools.addAllTasks();
grind(args);
}
@DefaultTask('Just keeping it real')
@Depends('pt-commit')
build() {
log('building...');
}
other packages: