CI: Zipped artifacts include full path from CI runner
akien-mga opened this issue · 3 comments
Godot version
4.0.1-stable
godot-cpp version
godot-4.0.1-stable
System information
Mageia 9, Linux
Issue description
I used this template as a base for https://github.com/akien-mga/threen, thanks for putting it together :)
The CI generated artifacts seem to be subpar for release purposes, as they include the full CI runner specific paths instead of just the files we're interested in: https://github.com/akien-mga/threen/releases/tag/1.0-beta1
$ unzip ~/Downloads/threen.linux.x86_64.zip
Archive: /home/akien/Downloads/threen.linux.x86_64.zip
creating: home/runner/work/threen/threen/bin/
inflating: home/runner/work/threen/threen/bin/libthreen.linux.template_debug.x86_64.so
inflating: home/runner/work/threen/threen/bin/threen.gdextension
In my case, the zip should contain the bin
folder as top level folder, since the .gdextension
file expects the lib in res://bin/...
.
As a side note, for release purposes it could make sense to also do a template_release
build to include in the same zip.
Hey Rémi, thanks for the kind words :D
thanks for raising this issue! I will get onto that. There was a similar issues with the workflows of my Shader Addons so I hope to get it fixed ASAP
I fixed the issue with akien-mga/threen@ced3a0b, basically it should use a relative path to bin/
(or here game/bin/
I believe) instead of an absolute path.
Adding the {{ matrix.target }}
to the zip name also prevented having the template_release
and template_debug
builds replace each other, so now I have all 6 zips: https://github.com/akien-mga/threen/releases/tag/1.0-beta2
The way actions/upload-artifact
zips things is nicer though, as it puts it all in the same artifact so the zip contains all 6 libraries: https://github.com/akien-mga/threen/actions/runs/4552572095
Would be nice if the release upload could do something similar.
I'd also suggest looking into official actions/...
actions like actions/create-release
and actions/upload-release-asset
instead of relying on actions maintained by a single community member, especially since we give those a write token. See e.g. https://trstringer.com/github-actions-create-release-upload-artifacts/
Thanks for the hints and suggestions! I did have difficulties to get the official ones working but that seems to be because I didn't use the relative part. CI/CD is quite new to me.
Edit: Also I noticed that the official actions/create-release
is unmaintained so that is also why I chose https://github.com/ncipollo/release-action: This is the note that they display on the official actions repo.