Skip to content

fix: use build.sh in release workflow to include minified assets - #12

Merged
84em merged 2 commits into
mainfrom
claude/analyze-copilot-review-Uqg4s
Jan 25, 2026
Merged

84em merged 2 commits into
mainfrom
claude/analyze-copilot-review-Uqg4s

Conversation

@84em

@84em 84em commented Jan 25, 2026

Copy link
Copy Markdown
Member

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.

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.
Copilot AI review requested due to automatic review settings January 25, 2026 15:38
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh instead of ./build.sh to 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

Copilot AI Jan 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@84em
84em merged commit b58b459 into main Jan 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants