Repository navigation
fix: use build.sh in release workflow to include minified assets - #12
Conversation
The release workflow was creating ZIP files directly from git without building minified CSS/JS assets first. Since these files are gitignored, released packages were missing essential frontend assets. This change uses the existing build.sh script which properly: - Installs npm dependencies - Builds minified CSS and JS with source maps - Creates clean ZIP with only production files - Excludes development files (tests, configs, etc.) Addresses issues identified in Copilot review of PR #10.
Release workflow: - Changed trigger from push-to-main to tag-based (v*) - Simplified by removing release-exists check (tags are unique) - Gets version directly from tag name - Workflow only runs when explicitly tagged for release Changelog: - Fixed inaccurate statement about workflow_dispatch - Original incorrectly stated "only works on PRs" - Corrected to "not needed for PR-only workflow" Addresses remaining issues from Copilot review of PR #10.
There was a problem hiding this comment.
Pull request overview
This PR fixes the release workflow to properly include minified CSS and JavaScript assets in released packages. Previously, the workflow created ZIP files directly from git without building assets, resulting in packages missing essential frontend files that are gitignored.
Changes:
- Replaces manual ZIP creation with the existing build.sh script that handles npm dependencies, asset minification, and proper file exclusion
- Adds Node.js setup step to support the build process
- Updates artifact file paths to match build.sh output locations in the repository root
Comments suppressed due to low confidence (1)
.github/workflows/release.yml:43
- The script execution may fail if build.sh doesn't have execute permissions in the repository. Consider using
bash build.shinstead of./build.shto avoid potential permission issues in the CI environment. This approach is more robust as it doesn't rely on the execute bit being set in git.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| build/84em-gravity-forms-ai-${{ steps.version.outputs.version }}.zip | ||
| build/84em-gravity-forms-ai.zip | ||
| 84em-gravity-forms-ai-${{ steps.version.outputs.version }}.zip | ||
| 84em-gravity-forms-ai.zip |
There was a problem hiding this comment.
The release workflow uses Node.js 20 while the deploy-plugin workflow uses Node.js 22. For consistency and to ensure identical build outputs across different workflows, consider using the same Node.js version in both workflows. This helps prevent subtle differences in build artifacts between deployments and releases.
The release workflow was creating ZIP files directly from git without
building minified CSS/JS assets first. Since these files are gitignored,
released packages were missing essential frontend assets.
This change uses the existing build.sh script which properly:
Addresses issues identified in Copilot review of PR #10.