Skip to content

Commit

Permalink
Update dart.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mocolicious authored Aug 11, 2024
1 parent b91190f commit f731bcd
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,17 @@ jobs:
env:
PUBDEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: |
mkdir -p ~/.dart
echo "$PUBDEV_TOKEN" > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
cat "$XDG_CONFIG_HOME/dart/pub-credentials.json" # Debug to ensure the file is created correctly
# Set the configuration path
CONFIG_PATH="${XDG_CONFIG_HOME:-$HOME/.config}/dart"
# Ensure the directory exists
mkdir -p "$CONFIG_PATH"
# Write the credentials to the appropriate location
echo "$PUBDEV_TOKEN" > "$CONFIG_PATH/pub-credentials.json"
# Verify the file was created correctly
cat "$CONFIG_PATH/pub-credentials.json"
- name: Publish to pub.dev (dry run)
run: flutter pub publish --dry-run
Expand Down

0 comments on commit f731bcd

Please sign in to comment.