Skip to content

Update test.yml

Update test.yml #83

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
env:
PLUGIN_SLUG: disable-drop-cap
steps:
- uses: actions/checkout@v1
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.0
extensions: zip
- name: Install composer dependencies
run: composer install --optimize-autoloader --no-dev
- name: WordPress Plugin Deploy
if: startsWith(github.ref, 'refs/tags/')
uses: 10up/action-wordpress-plugin-deploy@1.4.1
env:
SLUG: ${{env.PLUGIN_SLUG}}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- name: Remove
run: rm -fr .github node_modules .nvmrc .editorconfig .gitignore .prettierrc.js .git tests Dockerfile docker-compose.yml codeception.dist.yml
- name: Zip
run: rsync -av * ${{env.PLUGIN_SLUG}} && zip -r ${{env.PLUGIN_SLUG}}.zip ${{env.PLUGIN_SLUG}}
- uses: actions/upload-artifact@master
with:
name: ${{env.PLUGIN_SLUG}}
path: ${{env.PLUGIN_SLUG}}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{env.PLUGIN_SLUG}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}