Author Topic: Git and GitHub tagging commits and releases  (Read 61 times)

Offline Vagabond

  • Sr. Member
  • ****
  • Posts: 492
Git and GitHub tagging commits and releases
« on: October 22, 2017, 01:44:55 PM »
I'm starting to tag my releases in Git for OP2MapImager and OP2Archive. I noticed that GitHub automatically grabbed the tag and created a 'release' page associated with the tag with a zip file containing the source code as it existed for that release. https://github.com/OutpostUniverse/OP2MapImager/releases

I went in and edited the tag to add the binary of the executable and some release notes. I thought the results looked very nice.

Anyways, I don't know what people think about using that as the primary distribution source. Right now I am using the Wiki page here: https://wiki.outpost2.net/doku.php?id=outpost_2:helper_programs:map_imager.

I think I'm leaning towards switching to releases being on GitHub since it will be autogenerated when I tag the releases in Git anyways.

Also, just wanted to let people know the feature existed.

-Brett

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 1645
    • LairWorks Entertainment
Re: Git and GitHub tagging commits and releases
« Reply #1 on: October 22, 2017, 03:42:31 PM »
I'm agreeing with using GitHub as a distribution source. The tagging system is so easy to use and adding binaries is just as easy. Keeps everything in one place and end users can look at the associated code changes if they desire.
- Leeor
LairWorks Entertainment

Titanum UFO's

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4034
Re: Git and GitHub tagging commits and releases
« Reply #2 on: October 23, 2017, 01:44:05 PM »
Yeah, I'm liking the idea of using GitHub for distribution. Definitely a nice feature that integrates well with development.

I'm curious how you added binaries. I remember reading once about release tagging, and having binary distributions from GitHub. I think there was even a way to auto build the project and package the binary.

That would be awesome if we started doing that with all our projects.

Offline Vagabond

  • Sr. Member
  • ****
  • Posts: 492
Re: Git and GitHub tagging commits and releases
« Reply #3 on: October 23, 2017, 03:03:11 PM »
Hooman,

When I tagged the REPO via my local copy and then pushed that to GitHub, it automatically created a 'release' entry on GitHub with the current copy of the source code available for download via ZIP file. I then clicked the edit button next to the release, and it allowed me to add a description for the release. On this screen is where I just dragged and dropped the zip file for the binary.

The other way you could tackle it is just click the create tag/release button in GitHub and do it all from GitHub. I suppose you would download the tag next time you pulled changes to your local repository.

I haven't seen anything about further automating the process, but haven't looked either. Since I want to bundle the ReadMe, License, etc with the binary, I would need the automated process to someohow post this as opposed to just the binary?

Since I have the post build event in VS2017 already bundling everything into a zip file when compiled in RELEASE mode, it is pretty simple to just attach this to the release post on GitHub, and probably not worth the time to figure a way to automate it. (Although it would be iteresting to learn if there is one).

I'll look at starting to point the wiki to the GitHub Release section for future releases when I have some time.

-Brett