This may be obvious but I can't seem to find a way to publish nightly builds into the releases page, without having to manually update associated git tags each time.
What is the best practice to publish a build/release that always corresponds to the latest (current) commit of some branches? I want to have something like mysoftware-master-bin.gz and mysoftware-develop-bin.gz preferably available to be downloaded from the Releases page.
This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.
As you’ll notice, your Topic is now in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.
Let me know if you have any other questions or if I can help with anything else.
Thanks for being part of the Community Forum.
There are two ways things arrive on the Releases page: implicitly via tags and explicitly via the API or the UI creating a release and uploading artifacts. So, unfortunately, there isn't an automatic way to do what you're describing. You might be able to have a `latest` tag that you recreate each night, but that will require some action, even if scripted.
Please let us know if you have further questions!
@nadiajoyce thanks for your quick reply. Actually I've got the scripted part covered. The builds are ready and prepared to be uploaded every night.
The problem is that the releases API won't let me manage the releases without linking them to tags. And tags can't be (as far as I can tell) managed via API. Or, having a nightly release that is updated, well, nightly, implies that corresponding tags must also be updated each time. Or am I missing something?
Let's make sure that we have our terminology straight:
GitHub surfaces tags in the Releases UI but there aren't release records associated with them by default. So the releases API is used to manage release records, not to manage tags. Tags, because they are Git records, are managed by Git.
So yes, if you want to have a "nightly" release, you can do that. (I just tested it. Check out https://github.com/lee-dohm/test-repo/releases/tag/nightly ) You can create a `nightly` tag and create a release record for it. Then when the next nightly build happens:
I hope that helps 👍
@lee-dohm totally on the same page with you. In fact what you described here is the backup approach that I had in mind. The only problem with this approach is that when (if) the build is ready, I need to issue another coupe of git commands (aside from the required API calls). This is not exactly ideal, because I wanted to have read-only git access for the build, and now I need push rights. It's not the end of the world, it's just that I was hoping for a cleaner solution.
Anyways, it became clear to me that this is the only option I have. Thanks for all the help!