Deploy plugin to WordPress.org #85
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 to WordPress.org | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
inputs: | |
tmate_enabled: | |
type: boolean | |
description: 'Enable "tmate" for debugging' | |
required: false | |
default: false | |
jobs: | |
code-check: | |
name: Check the code | |
uses: ./.github/workflows/code-check.yml | |
secrets: inherit | |
deploy-wp-org: | |
name: Deploy the new tag | |
needs: code-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install linux packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y iproute2 | |
- name: Setup tmate session for Debugging, if inputs.tmate_enabled is true | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ inputs.tmate_enabled }} | |
timeout-minutes: 10 | |
with: | |
detached: true | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Prepare composer | |
run: | | |
$GITHUB_WORKSPACE/dev-workspace/run composer validate | |
$GITHUB_WORKSPACE/dev-workspace/run composer install | |
- name: Show version of tools inside the dev-workspace | |
run: | | |
$GITHUB_WORKSPACE/dev-workspace/run composer info:versions | |
- name: Build the package using ./dev-workspace | |
run: | | |
$GITHUB_WORKSPACE/dev-workspace/run composer build:dir | |
- name: WordPress.org plugin deploy | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: post-expirator | |
BUILD_DIR: ${{ github.workspace }}/dist/post-expirator | |
- name: Get the plugin version number | |
id: get-version | |
run: echo "version=$($GITHUB_WORKSPACE/dev-workspace/run pversion)" >> "$GITHUB_OUTPUT" | |
- name: Upload release asset | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ${{ github.workspace }}/dist/post-expirator-${{ steps.get-version.outputs.version }}.zip |