-
Notifications
You must be signed in to change notification settings - Fork 157
49 lines (45 loc) · 1.19 KB
/
generate-zip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Use desired version of NodeJS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Set PHP version
uses: shivammathur/setup-php@v2
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