shlink-manager/.github/workflows/fix-formatting-and-license.yml

45 lines
1.0 KiB
YAML
Raw Normal View History

2024-03-31 21:29:41 +02:00
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
2024-03-31 21:35:48 +02:00
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Flutter SDK
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.13.7
2024-03-31 21:29:41 +02:00
- 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