GitHub Actions used within the product ecosystem
This is a work in progress. The goal is to replace the existing iThemes Build system with GitHub Actions.
This GitHub workflow automates the process of generating a plugin zip file for distribution. It is triggered manually through the workflow_dispatch event and supports specifying a custom git commit reference (branch, tag, or hash). If no reference is provided, it uses the current branch.
ref(optional): The git commit reference (branch, tag, or hash) to be used for generating the plugin zip. Defaults to the current branch.plugin_slug(required): The slug of the plugin. It's used for naming the generated zip file and pot file.install_composer_packages(optional): A boolean flag to indicate if the composer dependencies should be installed as part of the build. Defaults tofalse.install_npm_packages(optional): A boolean flag to indicate if the npm dependencies should be installed and built as part of the build. Defaults tofalse.
- Calls the reusable workflow
generate-zip.ymlfrom theithemes/github-actionsrepository, passing the required inputs. - The reusable workflow checks out the specified
reffrom the repository. - Runs the plugin LION script.
- Installs composer dependencies (if
install_composer_packagesis set totrue). - Sets up Node.js and installs npm dependencies (if
install_npm_packagesis set totrue). - Generates a
.potfile for translations. - Generates the plugin zip file, excluding files and directories specified in the
.distignorefile. - Uploads the generated plugin zip as an artifact.
To trigger this workflow manually, navigate to the "Actions" tab in your repository, select the "Generate Plugin Zip" workflow, and click the "Run workflow" button. Fill in the required input fields and click the "Run workflow" button again.