The code below will automatically create a new asset for each new release that you publish on Github. Add it to your repository in a
.github/workflow/ folder and experience the magic yourself!
Update: I’ve also setup a sample repository with working code here:
Direct link to the workflow file: https://github.com/mklasen/zip-creation-github-action/blob/master/.github/workflows/release-action.yml
After a new release is created, a ZIP file will be added to the new release after the action ran, see an example release here: https://github.com/mklasen/zip-creation-github-action/releases/tag/v4
Original example code
Note: this snippet is created for PHP based repositories that user composer. If your repository does not use composer then you should remove the steps on line 15, 19 and 26 and customize the script to your needs.