translation_templates.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # SuperTux
  2. # Copyright (C) 2024 Tobias Markus
  3. #
  4. # This program is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU General Public License
  6. # as published by the Free Software Foundation; either version 3
  7. # of the License, or (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. name: translation_templates
  18. on:
  19. workflow_dispatch:
  20. jobs:
  21. update-all-templates:
  22. runs-on: ubuntu-20.04
  23. steps:
  24. - name: Checkout SuperTux repository
  25. uses: actions/checkout@v4
  26. with:
  27. repository: 'SuperTux/supertux'
  28. fetch-depth: 0
  29. - name: Update translation templates
  30. env:
  31. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  32. run: |
  33. # Update packages
  34. sudo apt-get update
  35. sudo apt-get install -y gettext
  36. # Checkout master to make git describe work
  37. git checkout master
  38. # Update translation templates:
  39. chmod +x makepot.sh
  40. sh ./makepot.sh
  41. # Commit
  42. git status
  43. git config --global user.email "SuperTux-bot@users.noreply.github.com"
  44. git config --global user.name "SuperTux Bot"
  45. git commit -am "Update translation templates" || true
  46. git push https://git:$GITHUB_TOKEN@github.com/SuperTux/supertux.git master