Skip to content

Publish

Publish #13

name: Publish
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter --version
- run: flutter pub get
- run: flutter pub global activate melos
- run: melos bootstrap
- name: Try to publish
run: melos publish --yes --dry-run
- name: Write token to local
run: |
mkdir -p ~/.config/dart
echo ${{ secrets.CREDENTIAL_JSON }} > ~/.config/dart/pub-credentials.json
- name: Publish to pub.dev
run: melos publish --yes --no-dry-run