Skip to content

1.0.2

1.0.2 #9

Workflow file for this run

name: 'Release'
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_FOLDER: build
PLUGIN_SLUG: tribe-embed
steps:
- name: Setup PHP with composer and extensions.
uses: shivammathur/[email protected]
with:
tools: composer, wp
php-version: 8.0
- name: Checkout Repo
uses: actions/checkout@v3
with:
path: ${{ env.BUILD_FOLDER }}
ref: ${{ github.ref }}
- name: Initialize Composer
run: |
cd ${{ env.BUILD_FOLDER }}
composer install --no-dev
composer dump-autoload
- name: NPM Setup
uses: actions/setup-node@v3
with:
node-version-file: "${{ env.BUILD_FOLDER }}/.nvmrc"
cache: 'npm'
cache-dependency-path: ${{ env.BUILD_FOLDER }}/package-lock.json
- name: NPM Install
run: |
cd ${{ env.BUILD_FOLDER }}
npm ci
- name: NPM Build
run: |
cd ${{ env.BUILD_FOLDER }}
npm run build
- name: Configure WP-CLI dist-archive-command
run: |
cd ${{ env.BUILD_FOLDER }}
wp package install wp-cli/dist-archive-command
- name: Build Plugin Zip
run: |
wp dist-archive ${{ env.BUILD_FOLDER }} --plugin-dirname=${{ env.PLUGIN_SLUG }}
- name: Save to Release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.zip"
tags: true