-
Notifications
You must be signed in to change notification settings - Fork 8
62 lines (50 loc) · 1.67 KB
/
translations.yml
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
55
56
57
58
59
60
61
62
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