ci: Fix release please (#21) #16
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: release-please | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
config-file: release-please-config.json | |
code-quality: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- uses: subosito/flutter-action@v2 | |
- name: Setup flutter | |
run: flutter pub get | |
- name: Lint and format | |
run: | | |
dart format . -l 120 | |
dart fix --apply | |
flutter analyze | |
- name: Check for modified files | |
id: git-check | |
run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV | |
- name: Update changes in GitHub repository | |
if: env.modified == 'true' | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git add -A | |
git commit -m '[automated commit] lint format and import sort' | |
git push -f |