Skip to content

Commit

Permalink
Merge pull request #34 from ndeet/workflow-fix
Browse files Browse the repository at this point in the history
Make sure npm build works.
  • Loading branch information
ndeet authored Dec 15, 2023
2 parents 22825c1 + fe037ee commit 11acaa8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/wp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,33 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Composer dependencies
uses: php-actions/composer@v6
with:
dev: no
php_version: 7.4
php_extensions: bcmath

- name: Install WP-CLI
run: |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Node.js dependencies
run: |
npm install

- name: Set Execute Permissions for build_i18n.sh
run: chmod +x bin/build_i18n.sh

- name: Build assets and translation files
run: |
npm install
npm run build
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
Expand All @@ -34,6 +45,7 @@ jobs:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: btcpay-greenfield-for-woocommerce

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build": "wp-scripts build && npm run i18n:build",
"i18n": "npm run i18n:build",
"i18n:build": "npm run i18n:pot && ./bin/build_i18n.sh",
"i18n:pot": "php -d xdebug.max_nesting_level=512 $(which wp) i18n make-pot --exclude=\"node_modules/,languages/,assets/\" --headers='{\"Report-Msgid-Bugs-To\":\"https://woocommerce.com/my-account/create-a-ticket/\", \"language-team\":\"LANGUAGE <EMAIL@ADDRESS>\"}' . languages/btcpay-greenfield-for-woocommerce.pot",
"i18n:pot": "php -d xdebug.max_nesting_level=512 wp i18n make-pot --exclude=\"node_modules/,languages/,assets/\" --headers='{\"Report-Msgid-Bugs-To\":\"https://woocommerce.com/my-account/create-a-ticket/\", \"language-team\":\"LANGUAGE <EMAIL@ADDRESS>\"}' . languages/btcpay-greenfield-for-woocommerce.pot",
"i18n:json": "$(which wp) i18n make-json languages --no-purge",
"check-engines": "wp-scripts check-engines"
}
Expand Down

0 comments on commit 11acaa8

Please sign in to comment.