Merge pull request #1106 from vektor-inc/fix/esc-typo-activation #339
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 to WordPress.org | |
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | |
env: | |
plugin_name: vk-all-in-one-expansion-unit | |
jobs: | |
plugin-deploy: | |
name: Deploy to Wordpress.org plugin directory | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: install npm scripts | |
run: npm install | |
- name: install Composer Package | |
run: composer install | |
- name: Install WP-CLI | |
run: | | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
mv wp-cli.phar /usr/local/bin/wp | |
- name: npm Build | |
run: npm run build | |
- name: Make Distribution | |
run: npm run dist:org | |
if: contains(github.ref, 'tags/') | |
- name: WordPress Plugin Deploy | |
uses: 10up/action-wordpress-plugin-deploy@master | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: vk-all-in-one-expansion-unit | |
release: | |
name: Release to GitHub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20.15.0 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: install npm scripts | |
run: npm install | |
- name: install Composer Package | |
run: composer install | |
- name: Install WP-CLI | |
run: | | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
mv wp-cli.phar /usr/local/bin/wp | |
- name: npm Build | |
run: npm run build | |
- name: Make Distribution | |
run: | | |
npm run dist:github | |
cd dist/ && zip -r ${{ env.plugin_name }}.zip ${{ env.plugin_name }}/ | |
- run: test -e dist/${{ env.plugin_name }}.zip | |
- 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 | |
- run : test -e dist/${{ env.plugin_name }}.zip | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/${{ env.plugin_name }}.zip | |
asset_name: ${{ env.plugin_name }}.zip | |
asset_content_type: application/zip |