Merge pull request #32 from mxnix/improve-ui #29
This file contains hidden or 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: Sync Generated Localizations | |
| on: | |
| push: | |
| paths: | |
| - "lib/l10n/*.arb" | |
| - "l10n.yaml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: sync-generated-localizations-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| env: | |
| FLUTTER_VERSION: 3.41.4 | |
| jobs: | |
| sync: | |
| name: Regenerate Flutter localization outputs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate localizations | |
| run: flutter gen-l10n | |
| - name: Commit generated localization files | |
| shell: bash | |
| run: | | |
| if git diff --quiet -- lib/l10n/generated; then | |
| echo "Generated localization files are already up to date." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add lib/l10n/generated | |
| git commit -m "chore(l10n): regenerate generated localizations" | |
| git push |