Generate ZIP #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate ZIP | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: 'Git Commit Ref (branch, tag, or hash)' | |
required: false | |
type: string | |
jobs: | |
generate_zip: | |
name: New ZIP file | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Use desired version of NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Set PHP version | |
uses: shivammathur/[email protected] | |
with: | |
php-version: 7.4 | |
tools: composer:v2, wp | |
- name: Check versions | |
run: | | |
npm -v | |
node -v | |
php -v | |
composer -v | |
- name: Install and build | |
run: | | |
composer install --no-dev | |
npm install | |
npm run release | |
npm run plugin-zip | |
rm -rf ./release && unzip ${{ github.event.repository.name }}.zip -d ./release | |
- name: Upload the ZIP file as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: release | |
retention-days: 5 |