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
Option Description
dartCliPath Path to Dart CLI. Default: dart
packages List of package directories (for monorepos)
skipValidation Skip analyzer and dependency checks
Name Description
PUBDEV_ACCESS_TOKEN Value of accessToken from credentials file
PUBDEV_REFRESH_TOKEN Value 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