Add URI to db error. #25
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: Deploy Plugin | |
on: | |
push: | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: PHP Unit Test | |
strategy: | |
matrix: | |
php: [ '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.4 | |
status-check: | |
name: Confirm All test passed | |
needs: [ test, lint ] | |
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.4 | |
tools: composer | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Plugin | |
run: bash bin/build.sh ${{ github.ref }} | |
- 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 |