regenerating pot file #22
This file contains 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: translation-workflow | |
run-name: regenerating pot file | |
on: | |
workflow_run: | |
workflows: ["Release"] | |
types: [requested] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update-pot-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master branch | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: "7.4" | |
- name: Setup WP-CLI | |
uses: godaddy-wordpress/setup-wp-cli@1 | |
####################### | |
### MAKE EDITS HERE ### | |
####################### | |
# edit .pot location | |
# remove/edit --subtract option | |
# add any files or folders for excluding if necessary with --exclude options | |
####################### | |
- name: Generate new pot file | |
run: > | |
wp i18n make-pot . languages/default.pot --skip-audit --subtract="languages/terms_to_exclude.pot" | |
--exclude="includes/admin" --exclude="includes/template-admin.php" | |
####################### | |
- name: Check diff output | |
run: git diff | wc -l | |
- name: Add changes | |
run: git add -A | |
- name: Check status | |
run: git status | |
- name: push changes | |
uses: github-actions-x/commit@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
push-branch: master | |
commit-message: 'Update .pot translation file' | |
name: ${{ github.actor }} | |
email: ${{github.actor}}@users.noreply.github.com | |
- name: Check git config | |
run: git config --list --show-origin |