Skip to content

feat: fix CI publish step: replace deprecated pub action with dart pub publish#77

Merged
nomeguy merged 2 commits intomasterfrom
copilot/fix-ci-error-again
Nov 18, 2025
Merged

feat: fix CI publish step: replace deprecated pub action with dart pub publish#77
nomeguy merged 2 commits intomasterfrom
copilot/fix-ci-error-again

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

The sakebook/actions-flutter-pub-publisher@v1.3.1 action fails with pub: not found because it expects the standalone pub command removed in Dart 3.x.

Changes

  • Replace deprecated action with native dart pub publish --force
  • Set up credentials via $HOME/.config/dart/pub-credentials.json (standard Dart credential location)
  • Remove redundant dry-run step
- name: Setup Pub Credentials
  run: |
    mkdir -p $HOME/.config/dart
    echo '${{ secrets.PUB_CREDENTIALS }}' > $HOME/.config/dart/pub-credentials.json

- name: Publish to pub.dev
  run: dart pub publish --force
Original prompt

This section details on the original issue you should resolve

<issue_title>[bug] fix CI error</issue_title>
<issue_description>see: https://github.com/casbin/dart-casbin/actions/runs/19476251913/job/55736782632

Run sakebook/actions-flutter-pub-publisher@v1.3.1
  with:
    credential: ***
    flutter_package: false
    skip_test: true
    dry_run: false
  env:
    PUB_ENVIRONMENT: bot.github
    DART_HOME: /opt/hostedtoolcache/dart/3.10.0/x64
    PUB_CACHE: /home/runner/.pub-cache
/usr/bin/docker run --name da4a1ed2343d4073da44dc8fb5cedd48c213a4_64a678 --label da4a1e --workdir /github/workspace --rm -e "PUB_ENVIRONMENT" -e "DART_HOME" -e "PUB_CACHE" -e "INPUT_PACKAGE_DIRECTORY" -e "INPUT_CREDENTIAL" -e "INPUT_FLUTTER_PACKAGE" -e "INPUT_SKIP_TEST" -e "INPUT_DRY_RUN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/dart-casbin/dart-casbin":"/github/workspace" da4a1e:d2343d4073da44dc8fb5cedd48c213a4
Check credentials
OK
Copy credentials
OK
Switching to package directory
Skip test
Executing package validation
/home/cirrus/entrypoint.sh: 63: pub: not found

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@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.

@nomeguy nomeguy marked this pull request as ready for review November 18, 2025 18:08
Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI error related to actions-flutter-pub-publisher Fix CI publish step: replace deprecated pub action with dart pub publish Nov 18, 2025
Copilot AI requested a review from nomeguy November 18, 2025 18:13
@nomeguy nomeguy changed the title Fix CI publish step: replace deprecated pub action with dart pub publish feat: fix CI publish step: replace deprecated pub action with dart pub publish Nov 18, 2025
@nomeguy nomeguy merged commit e8d057a into master Nov 18, 2025
7 of 8 checks passed
hsluoyz added a commit that referenced this pull request Nov 18, 2025
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
# [1.5.0](v1.4.0...v1.5.0) (2025-11-18)

### Features

* fix CI publish step: replace deprecated pub action with dart pub publish ([#77](#77)) ([110270d](110270d))
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.

[bug] fix CI error

3 participants