Skip to content

v2.7.0

v2.7.0 #11

name: Test and Deploy
on:
push:
tags:
- '*'
jobs:
test:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use desired version of Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Npm install and build
run: |
npm ci
npm run build
- name: Composer install and set phpcs
run: |
composer install
composer phpcs
- name: Running lint check
run: npm run lint
deploy:
name: Deploy to WP.org
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use desired version of Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Npm install and build
run: |
npm ci
npm run build
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: richtext-extension
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
commitish: main
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip