Skip to content

Merge pull request #450 from woocommerce/release/2.1.5 #75

Merge pull request #450 from woocommerce/release/2.1.5

Merge pull request #450 from woocommerce/release/2.1.5 #75

Workflow file for this run

name: Build
on:
workflow_call:
push:
branches:
- trunk
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
BuildExtensionBundle:
name: Build extension bundle
runs-on: ubuntu-latest
env:
FORCE_COLOR: 2
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare PHP
uses: woocommerce/grow/prepare-php@actions-v2
with:
install-deps: "no"
- name: Prepare node
uses: woocommerce/grow/prepare-node@actions-v2
with:
node-version-file: ".nvmrc"
ignore-scripts: "no"
- name: Build production bundle
run: |
echo "::group::Build log"
npm run build
echo "::endgroup::"
- name: Publish dev build to GitHub
if: ${{ github.event_name == 'push' && github.ref_name == 'trunk' }}
uses: woocommerce/grow/publish-extension-dev-build@actions-v2
with:
extension-asset-path: woocommerce-google-analytics-integration.zip
- name: Publish build artifact
if: ${{ ! ( github.event_name == 'push' && github.ref_name == 'trunk' ) }}
uses: actions/upload-artifact@v4
with:
name: woocommerce-google-analytics-integration.zip
path: ${{ github.workspace }}/woocommerce-google-analytics-integration.zip
# Do not bloat the storage. Keep in only long enough for a caller workflow to pick it up and follow up with some manual debugging.
retention-days: 2