elisescu / tty-share

Share your linux or osx terminal over the Internet.
https://tty-share.com/
MIT License
816 stars 87 forks source link

Automatically build and publish releases #47

Closed antifob closed 2 years ago

antifob commented 2 years ago

Adds a GitHub action to automatically build and publish releases when a tag matching "v*" is pushed.

Makes use of https://github.com/marvinpinto/action-automatic-releases

A "nothing up my sleeve" solution to release builds. Closes #23 and #44

elisescu commented 2 years ago

This is awesome, @antifob ! Thanks for the PR. Is there any way to test it before merging in the PR?

antifob commented 2 years ago

@elisescu You're welcome :) Thanks for sharing this nice project.

I could test it on my fork by adding tags and pushing them. Another clone would work too. So:

  1. create a repository (e.g. tty-share-pr47-testing) and push this branch to it.
  2. commit something, tag it (v.0.0.1`) and push both the commit and tag.

Note that the commit doesn't have to be on the main branch. At that point, GH should pick up the tag, build the binaries and publish them.

I should have mentionned that, currently, it builds for 3 targets: linux-amd64, linux-i386 and darwin-amd64. Feel free to add new targets by editing the matrix dictionary in the yml file: adding/editing/removing the goos and goarch entries to your liking.

Also, the main.version variable will be set to whatever's present after the v of the tag. For example, v1.9.9 means that main.version will be set to 1.9.9.

antifob commented 2 years ago

Oh, and I took the liberty to add the -s (strip) and -w (no dwarf debugging info) to reduce the size of the binaries. Again, feel free to remove them if you'd prefer to ship the debugging symbols and other metadata. :)

elisescu commented 2 years ago

Oh, and I took the liberty to add the -s (strip) and -w (no dwarf debugging info) to reduce the size of the binaries. Again, feel free to remove them if you'd prefer to ship the debugging symbols and other metadata. :)

Oh, that's great! It certainly makes sense to have stripping enabled. Thanks for the PR. Merging it :)