From 0af6d188e330b48043ab60813b733a1d5bfec368 Mon Sep 17 00:00:00 2001 From: Adrian Baumgart Date: Sun, 31 Mar 2024 21:29:41 +0200 Subject: [PATCH] Create fix-formatting-and-license.yml --- .../workflows/fix-formatting-and-license.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/fix-formatting-and-license.yml diff --git a/.github/workflows/fix-formatting-and-license.yml b/.github/workflows/fix-formatting-and-license.yml new file mode 100644 index 0000000..affaabc --- /dev/null +++ b/.github/workflows/fix-formatting-and-license.yml @@ -0,0 +1,31 @@ +name: Fix formatting and license file + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + + - name: Install dependencies + run: dart pub get + + - name: Verify formatting + run: dart format --output=none --set-exit-if-changed . + + - name: Update license file + run: flutter packages pub run license_generator generat + + - name: Commit and push + run: | + git config --global user.name 'Github Actions' + git config --global user.email 'adrian@abmgrt.dev' + git commit -am "Auto-corrected formatting and license file" + git push