ci: deploy to WordPress.org on stable releases (#95) #247
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ trunk ] | |
| pull_request: | |
| branches: [ trunk ] | |
| jobs: | |
| js: | |
| name: Lint · Types · Vitest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: ESLint | |
| run: npm run lint | |
| - name: TypeScript (no emit) | |
| run: npx tsc --noEmit | |
| - name: Vitest | |
| run: npm run test:js | |
| php: | |
| name: PHPUnit · PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ '8.1', '8.2' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Start wp-env | |
| env: | |
| WP_ENV_PHP_VERSION: ${{ matrix.php }} | |
| run: npm run env:start | |
| - name: Install PHP dev dependencies | |
| run: npm run test:php:install | |
| - name: Run PHPUnit | |
| run: npm run test:php | |
| plugin-check: | |
| name: Plugin Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Package release zip | |
| run: npm run package | |
| - name: Unzip release into build dir | |
| run: unzip -q desktop-mode.zip -d plugin-check-build | |
| - name: Run Plugin Check | |
| uses: wordpress/plugin-check-action@v1 | |
| with: | |
| build-dir: ./plugin-check-build/desktop-mode | |
| ignore-warnings: true |