Skip to content

feat: fix pub.dev OAuth credentials path in publishing workflow#79

Merged
nomeguy merged 3 commits intomasterfrom
copilot/fix-pub-dev-issue
Nov 18, 2025
Merged

feat: fix pub.dev OAuth credentials path in publishing workflow#79
nomeguy merged 3 commits intomasterfrom
copilot/fix-pub-dev-issue

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

The CI workflow was failing to publish to pub.dev with OAuth2 authorization errors because dart pub publish couldn't locate the credentials file.

Changes

  • Fixed credentials path: ~/.config/dart/pub-credentials.json~/.pub-cache/credentials.json
  • Reordered steps: Moved credentials setup before semantic-release to ensure availability throughout the process
  • Added documentation: Clarified that PUB_CREDENTIALS must be configured as a repository secret

The Dart pub tool expects credentials at ~/.pub-cache/credentials.json by default. The previous location caused the tool to fall back to interactive OAuth, which fails in CI.

- name: Setup Pub Credentials
  run: |
    mkdir -p $HOME/.pub-cache
    echo '${{ secrets.PUB_CREDENTIALS }}' > $HOME/.pub-cache/credentials.json
Original prompt

This section details on the original issue you should resolve

<issue_title>[bug] fix pub.dev issue</issue_title>
<issue_description>see: https://github.com/casbin/dart-casbin/actions/runs/19476622103/job/55738050315

Run dart pub publish --force
Resolving dependencies...
Downloading packages...
+ _fe_analyzer_shared 92.0.0
+ analyzer 9.0.0
+ args 2.7.0
+ async 2.13.0
+ boolean_selector 2.1.2
+ cli_config 0.2.0
+ collection 1.19.1
+ convert 3.1.2
+ coverage 1.15.0
+ crypto 3.0.7
+ expressions 0.2.5+3
+ file 7.0.1
+ frontend_server_client 4.0.0
+ glob 2.1.3
+ http_multi_server 3.2.2
+ http_parser 4.1.2
+ io 1.0.5
+ js 0.7.2
+ lints 5.1.1 (6.0.0 available)
+ logging 1.3.0
+ matcher 0.12.17
+ meta 1.17.0
+ mime 2.0.0
+ node_preamble 2.0.2
+ package_config 2.2.0
+ path 1.9.1
+ petitparser 7.0.1
+ pool 1.5.2
+ pub_semver 2.2.0
+ quiver 3.2.2
+ rxdart 0.28.0
+ shelf 1.4.2
+ shelf_packages_handler 3.0.2
+ shelf_static 1.1.3
+ shelf_web_socket 3.0.0
+ source_map_stack_trace 2.1.2
+ source_maps 0.10.13
+ source_span 1.10.1
+ stack_trace 1.12.1
+ stream_channel 2.1.4
+ string_scanner 1.4.1
+ term_glyph 1.2.2
+ test 1.27.0
+ test_api 0.7.8
+ test_core 0.6.13
+ typed_data 1.4.0
+ vm_service 15.0.2
+ watcher 1.1.4
+ web 1.1.1
+ web_socket 1.0.1
+ web_socket_channel 3.0.3
+ webkit_inspection_protocol 1.2.1
+ yaml 3.1.3
Changed 53 dependencies!
1 package has newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
Publishing casbin 1.5.0 to [https://pub.dev:](https://pub.dev/)
├── CHANGELOG.md (7 KB)
├── LICENSE (11 KB)
├── README.md (14 KB)
├── analysis_options.yaml (<1 KB)
├── casbin-logo.png (33 KB)
├── casbin_examples
│   ├── abac_model.conf (<1 KB)
│   ├── abac_rule_model.conf (<1 KB)
│   ├── abac_rule_policy.csv (<1 KB)
│   ├── abac_rule_with_domains_model.conf (<1 KB)
│   ├── abac_rule_with_domains_policy.csv (<1 KB)
│   ├── basic_inverse_policy.csv (<1 KB)
│   ├── basic_model.conf (<1 KB)
│   ├── basic_model_without_spaces.conf (<1 KB)
│   ├── basic_policy.csv (<1 KB)
│   ├── basic_with_root_model.conf (<1 KB)
│   ├── basic_without_resources_model.conf (<1 KB)
│   ├── basic_without_resources_policy.csv (<1 KB)
│   ├── basic_without_users_model.conf (<1 KB)
│   ├── basic_without_users_policy.csv (<1 KB)
│   ├── comment_model.conf (<1 KB)
│   ├── error
│   │   ├── error_model.conf (<1 KB)
│   │   └── error_policy.csv (<1 KB)
│   ├── glob_model.conf (<1 KB)
│   ├── glob_policy.csv (<1 KB)
│   ├── ipmatch_model.conf (<1 KB)
│   ├── ipmatch_policy.csv (<1 KB)
│   ├── keyget2_model.conf (<1 KB)
│   ├── keyget_model.conf (<1 KB)
│   ├── keymatch2_model.conf (<1 KB)
│   ├── keymatch2_policy.csv (<1 KB)
│   ├── keymatch_custom_model.conf (<1 KB)
│   ├── keymatch_model.conf (<1 KB)
│   ├── keymatch_policy.csv (<1 KB)
│   ├── priority_indeterminate_policy.csv (<1 KB)
│   ├── priority_model.conf (<1 KB)
│   ├── priority_model_explicit.conf (<1 KB)
│   ├── priority_policy.csv (<1 KB)
│   ├── priority_policy_explicit.csv (<1 KB)
│   ├── rbac_model.conf (<1 KB)
│   ├── rbac_model_in_multi_line.conf (<1 KB)
│   ├── rbac_model_matcher_using_in_op.conf (<1 KB)
│   ├── rbac_policy.csv (<1 KB)
│   ├── rbac_with_all_pattern_model.conf (<1 KB)
│   ├── rbac_with_all_pattern_policy.csv (<1 KB)
│   ├── rbac_with_deny_model.conf (<1 KB)
│   ├── rbac_with_deny_policy.csv (<1 KB)
│   ├── rbac_with_domain_pattern_model.conf (<1 KB)
│   ├── rbac_with_domain_pattern_policy.csv (<1 KB)
│   ├── rbac_with_domains_model.conf (<1 KB)
│   ├── rbac_with_domains_policy.csv (<1 KB)
│   ├── rbac_with_hierarchy_policy.csv (<1 KB)
│   ├── rbac_with_hierarchy_with_domains_policy.csv (<1 KB)
│   ├── rbac_with_not_deny_model.conf (<1 KB)
│   ├── rbac_with_pattern_model.conf (<1 KB)
│   ├── rbac_with_pattern_policy.csv (<1 KB)
│   ├── rbac_with_resource_roles_model.conf (<1 KB)
│   └── rbac_with_resource_roles_policy.csv (<1 KB)
├── example
│   └── README.md (<1 KB)
├── lib
│   ├── casbin.dart (1 KB)
│   └── src
│       ├── abac
│       │   └── abac_class.dart (<1 KB)
│       ├── config
│       │   └── config.dart (5 KB)
│       ├── core_enforcer.dart (11 KB)
│       ├── effect
│       │   ├── default_effector.dart (1 KB)
│       │   ├── effect.dart (<1 KB)
│       │   ├── effector.dart (1 KB)
│       │   └── index.dart (<1 KB)
│       ├── enforcer.dart (9 KB)
│       ├── exception
│       │   ├── casbin_adapter_exception.dart (<1 KB)
│       │   └── casbin_name_unexistent.dart (<1 KB)
│       ├── internal_enforcer.dart (8 KB)
│       ├── log
│       │   ├── default_logger.dart (2 KB)
│       │   ├── index.dart (<1 KB)
│       │   ├── log_util.dart (<1 KB)
│       │   └── logger.dart (1 KB)
│       ├── management_enforcer.dart (16 KB)
│       ├── model
│       │   ├── assertion.dart (2 KB)
│       │   ├── function_map.dart (1 KB)
│       │   ├── index.dart (<1 KB)
│       │   ├── model.dart (5 KB)
│       │   └── policy.dart (9 KB)
│       ├── persist
│       │   ├── adapter.dart (2 KB)
│       │   ...

</details>

- Fixes casbin/dart-casbin#78

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix pub.dev issue in dependency resolution Fix pub.dev OAuth credentials path in publishing workflow Nov 18, 2025
Copilot AI requested a review from nomeguy November 18, 2025 18:35
@nomeguy nomeguy marked this pull request as ready for review November 18, 2025 23:22
@nomeguy nomeguy changed the title Fix pub.dev OAuth credentials path in publishing workflow feat: fix pub.dev OAuth credentials path in publishing workflow Nov 18, 2025
@nomeguy nomeguy merged commit a32b363 into master Nov 18, 2025
4 of 5 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
# [1.6.0](v1.5.0...v1.6.0) (2025-11-18)

### Features

* fix pub.dev OAuth credentials path in publishing workflow ([#79](#79)) ([ece281c](ece281c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants