diff --git a/.distignore b/.distignore new file mode 100644 index 00000000000..e27e472d616 --- /dev/null +++ b/.distignore @@ -0,0 +1,24 @@ +.* +.*/ +*.lock +*.md +*.zip +babel.config.js +bin/ +build/ +CHANGELOG.txt +composer.* +docker-compose.yaml +Dockerfile +Gruntfile.js +node_modules/ +none +package-lock.json +package.json +packages/woocommerce-admin/docs +phpcs.xml +phpunit.xml +phpunit.xml.dist +README.md +renovate.json +tests diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 00000000000..3cfefb166e2 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,25 @@ +name: Build release asset +on: + release: + types: [published] +jobs: + build: + name: Build release asset + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build + id: build + uses: woocommerce/action-build@master + with: + generate-zip: true + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ steps.build.outputs.zip_path }} + asset_name: woocommerce.zip + asset_content_type: application/zip diff --git a/.gitignore b/.gitignore index 9bf4a8ba4cd..7687e1b7d28 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,6 @@ contributors.md # Language files i18n/languages/woocommerce.pot + +# Build +build/ diff --git a/composer.json b/composer.json index 983bab82972..7c536d6845d 100644 --- a/composer.json +++ b/composer.json @@ -68,7 +68,7 @@ "phpcbf -p" ], "makepot-audit": [ - "wp i18n make-pot . --exclude=\".github,.wordpress-org,bin,sample-data,node_modules,tests\" --slug=woocommerce" + "wp --allow-root i18n make-pot . --exclude=\".github,.wordpress-org,bin,sample-data,node_modules,tests\" --slug=woocommerce" ], "makepot": [ "@makepot-audit --skip-audit"