-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create publish wordpress workflow
- Loading branch information
1 parent
bc3d92a
commit f6df09b
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
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 |