diff --git a/.github/workflows/build-and-tag.yml b/.github/workflows/build-and-tag.yml index 63026eb80..d7db05480 100644 --- a/.github/workflows/build-and-tag.yml +++ b/.github/workflows/build-and-tag.yml @@ -1,4 +1,8 @@ name: Build and Tag + +env: + NODE_VERSION: "20" + on: push: branches: @@ -22,10 +26,10 @@ jobs: - name: composer install run: composer install - - name: install node v20 + - name: "install node v${{ env.NODE_VERSION }}" uses: actions/setup-node@v4 with: - node-version: 20 + node-version: ${{ env.NODE_VERSION }} - name: Build run: | diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 5d950dc41..8130bc810 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -1,5 +1,8 @@ name: Build Docs +env: + NODE_VERSION: "20" + on: push: branches: @@ -54,10 +57,10 @@ jobs: wp package install felipeelia/cli-command-docs:dev-trunk wp cli-command-docs elasticpress --custom-order=sync,activate-feature,deactivate-feature,list-features,get-algorithm-version,set-algorithm-version --remove=delete_transient_on_int,custom_get_transient,stop_on_failed_mapping,call_ep_cli_put_mapping,should_interrupt_sync,index_output,get-indexes,get-cluster-indexes,index,clear-index,get-indexing-status,get-last-cli-index,stop-indexing --custom-intro='The following WP-CLI commands are supported by ElasticPress:' > wp-content/plugins/elasticpress/docs/wp-cli.md - - name: Use Node.js 20 + - name: "install node v${{ env.NODE_VERSION }}" uses: actions/setup-node@v4 with: - node-version: '20' + node-version: ${{ env.NODE_VERSION }} - name: npm ci, and build docs run: | diff --git a/.github/workflows/build-with-vendor-prefixed.yml b/.github/workflows/build-with-vendor-prefixed.yml index 53cb0a3a3..7c6d20894 100644 --- a/.github/workflows/build-with-vendor-prefixed.yml +++ b/.github/workflows/build-with-vendor-prefixed.yml @@ -1,5 +1,8 @@ name: Build with vendor-prefixed +env: + NODE_VERSION: "20" + on: pull_request: branches: @@ -24,19 +27,16 @@ jobs: - name: composer install run: composer install - - name: install node v20 + - name: "install node v${{ env.NODE_VERSION }}" uses: actions/setup-node@v4 with: - node-version: 20 + node-version: ${{ env.NODE_VERSION }} - name: Build run: | npm ci npm run build - - name: Setup - run: 'echo "VERSION=$(grep -Po ''\"version\": \"[0-9\\.]+\"'' package.json | grep -Po ''[0-9\\.]+'')" >> $GITHUB_ENV' - - name: Zip run: npm run build:zip @@ -47,4 +47,3 @@ jobs: retention-days: 2 path: | ${{ github.workspace }}/elasticpress.zip -