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

add Zip artifact to release workflow #12

Open
megonemad1 opened this issue Feb 5, 2025 · 6 comments
Open

add Zip artifact to release workflow #12

megonemad1 opened this issue Feb 5, 2025 · 6 comments

Comments

@megonemad1
Copy link

Started working on something similar, you seem to have a way more advanced setup.
My initial use case was for releases to package the addon directory in the same way the godot asset library does.
this way if they are in a zip that can be linked to for automatic download it would mean a custom asset library server can point to them.
hoped the thought is of interest, feel free to ignore

@florianvazelle
Copy link
Member

Hi, good point ! 😃

Github allows you to export the code in zip format on https://github.com/<user>/<repo>/archive/<branch>.zip.
For example: https://github.com/MechanicalFlower/godot-addon-template/archive/main.zip, and this works with tag branch.
Because, the .gitattributes file is used to specify items to be exported using this method.
So I specify only the addons folder (I just committed a fix 7902cf9) .

Does this meet your use case?

@florianvazelle
Copy link
Member

A more generic solution will be to add an export step that run git archive --format=zip --output ./dist/greeter.zip HEAD and add the zip to the release 👀

@megonemad1
Copy link
Author

I think that works, NGL I'm not well versed in GitHub actions. But the add-on folder being the whole zip should match the Godot asset library interface. One of my goals is to make a way to rigg up a custom asset library endpoint that is directly polling GitHub for repos that match the format and can be downloaded

@megonemad1
Copy link
Author

Another dumb thought is the license would want to be packaged as well since and possibly the readme since the release zip would not have that and would be the only thing downloaded

@florianvazelle
Copy link
Member

This requires a different file hierarchy, you'd have to put the README and license inside the addons folder, so they'd be exported and wouldn't collide with other addons

@megonemad1
Copy link
Author

The zip is made by workflow you could always hack it in like that so it copies the readme to the add-on file before creating the zip

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

No branches or pull requests

2 participants