1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
name: Update POT file
on:
push:
branches:
- master
workflow_dispatch:
jobs:
check_new_string:
name: Linux x64_64 (check)
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.step1.outputs.check_ret }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: '0'
- id: step1
name: Check if POT file needs to be regenerated
run: echo "check_ret=$(bash ./scripts/check_new_strings.sh)" >> $GITHUB_OUTPUT
update_pot_file:
name: Linux x64_64 (L10n)
runs-on: ubuntu-latest
needs: check_new_string
if: ${{ needs.check_new_string.outputs.output1 == 'REGEN' }}
steps:
- uses: actions/checkout@v5
- uses: abbbi/github-actions-tune@v1
- name: Install packages
run: sudo apt-get install -y -qq cmake ninja-build gettext
- name: Disable all options in CMakeLists.txt
run: sed -i 's/ ON)$/ OFF)/g' "$GITHUB_WORKSPACE/CMakeLists.txt"
- name: Generate files for build system
run: cmake -S "$GITHUB_WORKSPACE" -B build -GNinja -DWITH_GETTEXT=1
- name: Generate new POT file
run: ninja -C build genpot
- uses: EndBug/add-and-commit@v9
with:
add: 'po'
message: 'Regen POT file'
pull: '--ff-only'
push: true
|