@ondeinference / onde / commits / 796484f

Fix Dart pub credentials path for pub.dev publishing

Update release-sdk-dart.yml to write credentials to the correct OS-specific location ($XDG_CONFIG_HOME/dart/pub-credentials.json) instead of ~/.pub-cache/credentials.json. Update instructions to clarify where to obtain the credentials file on each platform.

keypair34 committed Apr 5, 2026 at 16:25 UTC 796484f7326e1e3c56c394638007af8854a2c9ff
1 file changed +11 -7
.github/workflows/release-sdk-dart.yml
+11 -7
@@ -94,18 +94,22 @@ jobs:
94
95 # ── Authenticate with pub.dev ─────────────────────────────────────────
96 # PUB_CREDENTIALS must be a repository secret containing the full JSON
97 - # content of ~/.pub-cache/credentials.json obtained from a machine that
98 - # has already run `dart pub login` (or `flutter pub login`) and authorised
99 - # the ondeinference pub.dev publisher account.
97 + # content of the Dart pub credentials file obtained from a machine that
98 + # has already run `dart pub login` and authorised the pub.dev publisher.
99 + #
100 + # The credentials file location depends on your OS:
101 + # macOS: ~/Library/Application Support/dart/pub-credentials.json
102 + # Linux: ~/.config/dart/pub-credentials.json ($XDG_CONFIG_HOME/dart/)
103 + # Windows: %APPDATA%\dart\pub-credentials.json
104 #
105 # To obtain the credentials:
102 - # 1. Run `dart pub login` on a local machine.
103 - # 2. Copy the contents of ~/.pub-cache/credentials.json.
106 + # 1. Run `dart pub login` on a local machine and authorise in the browser.
107 + # 2. Copy the full JSON content of the credentials file for your OS above.
108 # 3. Add it as a repository secret named PUB_CREDENTIALS.
109 - name: Set up pub.dev credentials
110 run: |
107 - mkdir -p ~/.pub-cache
108 - echo '${{ secrets.PUB_CREDENTIALS }}' > ~/.pub-cache/credentials.json
111 + mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/dart"
112 + echo '${{ secrets.PUB_CREDENTIALS }}' > "${XDG_CONFIG_HOME:-$HOME/.config}/dart/pub-credentials.json"
113
114 # ── Publish ────────────────────────────────────────────────────────────
115 - name: Publish onde_inference to pub.dev