Skip to content

pub.dev

Pushes a new Dart or Flutter package to pub.dev.

Because there is no automated way to obtain tokens, you must perform a valid release manually first for each package. This generates credentials at:

  • macOS: $HOME/Library/Application Support/dart/pub-credentials.json
  • Linux: $HOME/.config/dart/pub-credentials.json
  • Or: $HOME/.pub-cache/credentials.json
OptionDescription
dartCliPathPath to Dart CLI. Default: dart
packagesList of package directories (for monorepos)
skipValidationSkip analyzer and dependency checks
NameDescription
PUBDEV_ACCESS_TOKENValue of accessToken from credentials file
PUBDEV_REFRESH_TOKENValue of refreshToken from credentials file
targets:
- name: pub-dev
targets:
- name: pub-dev
packages:
uno:
dos:
tres:

Use cautiously—this skips analyzer checks:

targets:
- name: pub-dev
skipValidation: true