k-paxian / dart-package-publisher

Action to Publish Dart / Flutter Package To https://pub.dev When you need to publish a package, just bump the version in pubspec.yaml
MIT License
66 stars 10 forks source link

Credential path has changed #22

Closed zbarbuto closed 2 years ago

zbarbuto commented 2 years ago

I was using what I was 100% sure were valid credentials with the latest stable flutter but was getting the "Pub needs your authorization to upload..." error.

Based on the answer to this question it appears that the path to the credential for Linux-based flutter is now ~/.config/dart/pub-credentials.json (which seems legit as on my Mac the path is the one listed there as well: ~/Library/Application Support/dart/pub-credentials.json)

I tried publishing a github action again manually putting the same credential json content the credential in this location via:

        mkdir -p ~/.config/dart/
        cat <<EOF > ~/.config/dart/pub-credentials.json
          ${{ secrets.CREDENTIAL_JSON }}
        EOF

and the publish worked.