Skip to content

Merge feature/stats #97

Merge feature/stats

Merge feature/stats #97

Workflow file for this run

name: Create Plugin Release
on:
pull_request:
types:
- closed
branches:
- 'trunk'
jobs:
deploy:
if: github.event.pull_request.merged == true && startsWith( github.head_ref, 'release/' )
runs-on: ubuntu-latest
name: WPJM Release
steps:
- uses: actions/checkout@v4
- name: Comment on PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh pr comment ${{ github.event.number }} --body "🚀 **[Release workflow started](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})**"
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer
coverage: none
- name: Install JS dependencies
run: npm ci
- name: Install PHP dependencies
run: composer install --no-ansi --no-interaction --prefer-dist --no-progress
- name: Setup Git
run: |
git config user.name "WPJM Bot"
git config user.email "<[email protected]>"
- name: Create Release
id: create_release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
node scripts/create-release.mjs wp-job-manager ${{ github.event.number }}
unzip -q wp-job-manager.zip
- name: Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@abb939a0d0bfd01063e8d1933833209201557381
env:
SVN_PASSWORD: ${{ secrets.WORDPRESSORG_SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.WORDPRESSORG_SVN_USERNAME }}
BUILD_DIR: wp-job-manager
SLUG: wp-job-manager
VERSION: ${{ steps.create_release.outputs.version }}
- name: Comment on PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh pr comment ${{ github.event.number }} --body "✅ Release **${{ steps.create_release.outputs.version }}** [deployed to WordPress.org](https://wordpress.org/plugins/wp-job-manager/)."