Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "Build release zip" GitHub Action #168

Merged
merged 3 commits into from
Dec 6, 2022
Merged

Conversation

faisal-alvi
Copy link
Member

Description of the Change

PR Adds "Build release zip" GitHub Action to generate the release zip before the actual release and Release Instructions are updated to test generated zip before shipping a release.

Closes #167

How to test the Change

Fork the repo, merged this workflow, and tested the ZIP locally.

Changelog Entry

Added - "Build release zip" GitHub Action.

Credits

Props @faisal-alvi

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@faisal-alvi faisal-alvi added this to the 2.7.0 milestone Dec 2, 2022
@faisal-alvi faisal-alvi self-assigned this Dec 2, 2022
@faisal-alvi faisal-alvi requested review from a team and peterwilsoncc and removed request for a team December 2, 2022 16:16
Copy link
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

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

I reviewed the zip file generated on your repo in the action https://github.com/faisal-alvi/simple-local-avatars/actions/runs/3603276090

As noted inline, it's including some files that aren't needed.

.github/workflows/build-release-zip.yml Outdated Show resolved Hide resolved
Comment on lines 17 to 27
- name: Cache vendor
id: cache-composer
uses: actions/cache@v3
env:
cache-name: cache-vendor
with:
path: |
vendor
~/.composer/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}

Copy link
Contributor

Choose a reason for hiding this comment

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

Composer only uses dev dependencies and isn't loaded in production (ie, autoload isn't referenced) so can be ignored from the build here. It's not included in the wp.org version either, see https://plugins.trac.wordpress.org/browser/simple-local-avatars/trunk

Copy link
Member Author

Choose a reason for hiding this comment

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

The composer dependencies install step is removed.

Copy link
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

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

Thank you kindly, this looks good.

Are you able to re-run against your fork and self merge once you confirm the zip matches that on wp.org?

@faisal-alvi
Copy link
Member Author

@peterwilsoncc I checked the new zip and it now matches with the wp.org (vendor folder is not included), thank you!

@faisal-alvi faisal-alvi merged commit 2774a0f into develop Dec 6, 2022
@faisal-alvi faisal-alvi deleted the enhancement/167 branch December 6, 2022 09:09
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.

Add a "Build release zip" GitHub Action
2 participants