https://github.com/woocommerce/action-build
GitHub Action to build WooCommerce running Composer and NPM
https://github.com/woocommerce/action-build
Last synced: 3 months ago
JSON representation
GitHub Action to build WooCommerce running Composer and NPM
- Host: GitHub
- URL: https://github.com/woocommerce/action-build
- Owner: woocommerce
- License: gpl-3.0
- Created: 2020-04-27T22:31:49.000Z (over 5 years ago)
- Default Branch: trunk
- Last Pushed: 2022-04-27T00:24:30.000Z (over 3 years ago)
- Last Synced: 2025-03-22T05:33:48.255Z (10 months ago)
- Language: Shell
- Size: 43.9 KB
- Stars: 6
- Watchers: 97
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WooCommerce - Action Build
A GitHub Action to build WooCommerce using Composer and NPM.
## Managing files in the build
Use a `.distignore` file to exclude files from the build.
Set an environment variable `BUILD_ENV` to "e2e" to include files relevant for e2e tests. Alternatively set the variable to "mirrors" to include files relevant for production mirror repo zips.
## Example
```yaml
name: Build release and save asset
on:
release:
types: [published]
jobs:
build:
name: Build release and save 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: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
```