Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to pub.dev | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter pub get | |
- run: flutter pub run tool/publish/check_version.dart ${GITHUB_REF} | |
- name: Analyze | |
run: flutter analyze | |
- name: Format | |
run: dart format --set-exit-if-changed . | |
- name: Prepare pub credentials | |
run: mkdir -p $XDG_CONFIG_HOME/dart && echo '${{ secrets.PUB_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json" | |
- name: Publish package | |
run: flutter pub publish --force |