Skip to content

Commit

Permalink
Update dart.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mocolicious authored Jul 17, 2024
1 parent 949f3ab commit 027cb11
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ jobs:

- name: Publish to pub.dev (dry run)
env:
PUB_DEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: flutter pub publish --dry-run
PUBDEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: |
mkdir -p ~/.pub-cache
echo "{\"https://pub.dev\": {\"token\": \"$PUBDEV_TOKEN\"}}" > ~/.pub-cache/credentials.json
flutter pub publish --dry-run
- name: Publish to pub.dev
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
PUB_DEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: flutter pub publish --force
PUBDEV_TOKEN: ${{ secrets.PUBDEV_TOKEN }}
run: |
mkdir -p ~/.pub-cache
echo "{\"https://pub.dev\": {\"token\": \"$PUBDEV_TOKEN\"}}" > ~/.pub-cache/credentials.json
flutter pub publish --force

0 comments on commit 027cb11

Please sign in to comment.