diff --git a/.github/workflows/wp-release.yml b/.github/workflows/wp-release.yml index 0ba0187..fc73b8b 100644 --- a/.github/workflows/wp-release.yml +++ b/.github/workflows/wp-release.yml @@ -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 @@ -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: diff --git a/package.json b/package.json index 469ef2d..53d255c 100644 --- a/package.json +++ b/package.json @@ -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 \"}' . 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 \"}' . languages/btcpay-greenfield-for-woocommerce.pot", "i18n:json": "$(which wp) i18n make-json languages --no-purge", "check-engines": "wp-scripts check-engines" }