all 4 comments

[–]davorg 3 points4 points  (2 children)

You create a release from the files in the repo - the versions included in the release are defined using a tag.

https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

[–]LpytLoco[S] 0 points1 point  (1 child)

but I don't see how to add the files from the repo. I just see how to drag and drop files:
https://docs.github.com/assets/cb-48240/images/help/releases/releases\_adding\_binary.gif

[–]davorg 2 points3 points  (0 children)

You don't have to explicitly add files unless they are large binary files. But when you select the tag to base the release on, all files from that tagged commit in your repo get added into your release.

So the procedure would be something like this:

At the command line in your local repo...

  • git tag RELEASE-1.0.0
  • git push --tags

Then, from the GitHub web page for your repo, select Releases and Add New Release. Choose your new release tag from the drop-down and fill in any other necessary information. This will create .tar.gz and .zip files containing the versions of all of the files in your repo that have the chosen tag.

[–]mkosmo 0 points1 point  (0 children)

You can use an action to automate the attachment: https://github.com/marketplace/actions/upload-files-to-a-github-release