3.0.1 #18
Workflow file for this run
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: Deploy | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| lint: | |
| name: Lint (PHP ${{ matrix.php-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ['8.2', '8.4'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install Node packages | |
| run: npm ci | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| - name: Install Composer packages | |
| run: composer install --prefer-dist --no-progress --no-suggest | |
| - name: Run lint | |
| run: npm run lint | |
| deploy: | |
| name: Deploy | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| - name: Install Composer packages | |
| run: composer install --no-dev --optimize-autoloader | |
| - name: Clean up old SVN tags | |
| run: bash .github/workflows/cleanup-svn-tags.sh | |
| env: | |
| SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
| SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
| - name: Deploy to WordPress SVN | |
| id: deploy | |
| uses: 10up/action-wordpress-plugin-deploy@stable | |
| env: | |
| SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
| SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
| with: | |
| generate-zip: true | |
| - name: Upload release asset | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload \ | |
| ${{ github.event.release.tag_name }} \ | |
| ${{github.workspace}}/${{ github.event.repository.name }}.zip |