add build_deploy.yml #1
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: [7.3] | |
env: | |
secure: WYH4JaFh+qKyBlrwVf6irhrYLJ7RSXXJqiElQAwXz1FbdB7njDM/qGlvGdH0uvM0xUEaHEiMl7qs4F5W9H9yjRkK9Vp4mfR9UkWWCmPP1JslW5/scpxyg8+lYwFXmNmqLW69xVqQgQDJFab5Dn/Jpct/oF7ijBiYHl0eopNnDrGDB956JtLLiHmQe3Rqi6zaPzR8/a0Xv0NGSi2nOMrkIZlkg5h9J5ZT6lssrNmgUvFqW1sr85LBWguW+L8BkGPly55UpxheAt2NQ3G2KYKsAU68uBcO6sQUezV3RdSJ1ShyrP+OgMKK55n/VV9BOMcy+ZUL4q4os6YhmzFdv/ySnn3azKEHuBuaiVF5aEcgPzPgeQqVYFC7G3gZirrZyFQ7fthX9MOmKHtT4KMLh7sZk8monWODz0Bct8MJGZrF43OyaBwpFqwpHA9AW5bkZxURgEGWs8UtK6JbXcgV2oYc4HyTXfnqDgywXAI9y+A8WmiIvlmTL7rQqzqbWJvN2e7T2gpXsg0BmKqIt/K1sR5KZoh9B1pwMAAfVc2ip6Ibduu5NvvyFE+PdlwFrprD8RFg9aihrDkPDXK0flAxqVKgsx0yJq8jvjWpn5F3+pcsNuQKpMQZPzZ8R+09JynvIiikCiZ8L9IGVR0zJ6lzTiyeMw/erBwNaYtPpAss9mt7rxg= | |
steps: | |
- name: Set up PHP ${{ matrix.php-version }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer, node | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 10.13.0 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
yarn install | |
yarn build | |
- name: PHP Lint | |
run: find . -name '*.php' -exec php -lf {} \; | |
- name: Run PHP CodeSniffer | |
run: | | |
$GITHUB_WORKSPACE/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=$GITHUB_WORKSPACE/phpcs.ruleset.xml --ignore=*partials/hover-colors-only.php,*/scssphp/*,*/kirki/*,*/wp_bootstrap_navwalker.php,*/woocommerce/*,*/sa_templates/*,functions.php --extensions=php | |
deploy: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build zip | |
run: node build/build-zip.js | |
- name: Upload to GitHub Releases | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: crio.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |