concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Add GitHub Action to attach .zip file to releases #767

Closed mlocati closed 1 year ago

mlocati commented 1 year ago

What about adding a GitHub Action that automatically creates the .zip archive to be attached to GitHub Releases?

If you want to see it in action: see this execution that automatically attached community_store.zip when I created this sample release.

PS: in order to grant the permission to attach files to releases, you need to:

  1. create a Personal Access Token. For better security, you can create a "Fine-grained Personal Access Token" at https://github.com/settings/tokens?type=beta limiting its access to the concretecms-community-store/community_store repository and selecting only this permission:
    immagine
  2. create a secret in the concretecms-community-store/community_store named ATTACH_ASSETS_SECRET with the value of the above personal access token
Mesuva commented 1 year ago

This is great, I'll test this out for the next release. And then I have no trouble, will likely set this up for the commonly used payment methods.

mlocati commented 1 year ago

will likely set this up for the commonly used payment methods

That'd be great! Just remember to add a .gitatrributes file that marks as export-ignore all the files that are not needed in production.

mlocati commented 1 year ago

@Mesuva I'd like to add the same action to https://github.com/concretecms-community-store/community_store_bcc_payway and https://github.com/concretecms-community-store/community_store_bulk_product_updating What about creating a ATTACH_ASSETS_SECRET secret at the concretecms-community-store organization level, so that it can be used by any Community Store repository?

In order to do that:

  1. the personal access token created at https://github.com/settings/personal-access-tokens/new for the concretecms-community-store organization level should be granted access to all the repositories (still with only the Contents read/write access)
  2. the ATTACH_ASSETS_SECRET secret can be defined at the organization level at https://github.com/organizations/concretecms-community-store/settings/secrets/actions If you want, in this same page you can also restrict the repositories that will be able to use this secret.
mlocati commented 1 year ago

Please discard the above message of mine: it's superseded by #780