Skip to content

Pass defautl value to parser #10

Pass defautl value to parser

Pass defautl value to parser #10

Workflow file for this run

name: Deploy Plugin
on:
push:
tags:
- '*'
pull_request:
branches:
- master
jobs:
# test:
# name: PHP Unit Test
# strategy:
# matrix:
# php: [ '7.2', '7.4', '8.1' ] # PHP versions to check.
# wp: [ 'latest', '5.9' ] # WordPress version to check.
# uses: tarosky/workflows/.github/workflows/wp-unit-test.yml@main
# with:
# php_version: ${{ matrix.php }}
# wp_version: ${{ matrix.wp }}
lint:
name: PHP Syntax Check
uses: tarosky/workflows/.github/workflows/phpcs.yml@main
with:
version: 7.2
assets:
uses: tarosky/workflows/.github/workflows/npm.yml@main
with:
node_version: 18
command: lint
package: build
status-check:
name: Confirm All test passed
needs: [ lint, assets ] # [ test, lint, assets ] # WordPress.org problem
runs-on: ubuntu-latest
if: always()
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
release:
name: Deploy WordPress.org
needs: [ status-check ]
if: contains(github.ref, 'tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Setup PHP with composer
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
tools: composer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Plugin
run: bash bin/build.sh ${{ github.ref }}
- name: Generate readme.txt
uses: tarosky/workflows/actions/wp-readme@main
- name: Versioning
uses: tarosky/workflows/actions/versioning@main
with:
version: ${{ github.ref }}
files: readme.txt,for-your-eyes-only.php
- name: Install Subversion
run: sudo apt-get install subversion
- name: Deploy to WordPress Directory
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.WP_ORG_USERNAME_TAROSKY }}
SVN_PASSWORD: ${{ secrets.WP_ORG_PASSWORD_TAROSKY }}
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip