Merge pull request #26314 from woocommerce/add/build-workflow

Build release workflow
This commit is contained in:
Néstor Soriano 2020-05-15 10:36:34 +02:00 committed by GitHub
commit eab8920a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 1 deletions

24
.distignore Normal file
View File

@ -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

25
.github/workflows/build-release.yml vendored Normal file
View File

@ -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

3
.gitignore vendored
View File

@ -64,3 +64,6 @@ contributors.md
# Language files # Language files
i18n/languages/woocommerce.pot i18n/languages/woocommerce.pot
# Build
build/

View File

@ -68,7 +68,7 @@
"phpcbf -p" "phpcbf -p"
], ],
"makepot-audit": [ "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": [
"@makepot-audit --skip-audit" "@makepot-audit --skip-audit"