Skip to content

Commit

Permalink
feat: create publish wordpress workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
icaparros-at-wiris committed Oct 18, 2023
1 parent bc3d92a commit f6df09b
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/publish-wordpress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Publishes the MathType integrations WordPress packages to AWS S3
#
# Jobs:
# - Publish Wordpress
#
name: Publish WordPress

# Controls when the action will run
on:
workflow_dispatch:
inputs:
publish_aws:
description: |
Whether to publish the generated artifacts to S3.
Type `publish_aws` to do publish to S3, any other value otherwise.
required: false
default: ""
versions:
description: |
Version for MathType for WordPress to publish, e.g.: "8.6.0"
required: false
default: ""

# Array of jobs to run in this workflow
jobs:
publish-wordpres:
runs-on: ubuntu-latest

if: github.event.inputs.publish_npm == 'publish_npm'

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

# Install dependencies and create compiled files
- name: Build the JavaScript
run: |
yarn install
nx build wordpress
- name: Create Icons folder inside the build one
run: |
cp -a packages/wordpress/src/icons/ packages/wordpress/build/icons/
# Create a zip file with the files needed to integrate
# Mathtype for WordPress
- name: Zip integration
uses: vimtor/action-zip@v1
with:
files: build/ VERSION
dest: "mathtype-tinymce-wordpress_${{ github.event.inputs.version }}.zip"
- uses: vimtor/action-zip@v1
with:
files: wordpress-wiris-plugin/tiny_mce_wiris.php
dest: "wordpress-wiris_${{ github.event.inputs.version }}.zip"

# Release WordPress plugin
- name: Release on GitHub
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
title: "CI"
files: |
*.zip

0 comments on commit f6df09b

Please sign in to comment.