# How to set up releases on Github and why they are necessary

日本語版: 日本語で読む

Table of Contents

I had created a release on Github once two years ago, but it had been so long that I had forgotten about it, so I decided to summarize it again.

tag a branch

I wasn’t sure about the best practices for releases, so I looked it up and found that for small sites, you can manage it by tagging the main branch, so I decided to do that this time.

That’s why I add tags first.

Go to main branch,

Terminal window
git tag -a v0.0.0 -m "Initial release"
git push origin v0.0.0

Tag and push tags.

Set up from Github

All you have to do is go to the Github repository, select the tag you created from the release page, and release it.

Do I need to create a release?

I wondered if there was a need for release management if the main branch was always the latest and the code at the time of tagging could not be Clone.

When I looked into it, it seems that a release is a snapshot of a moment and seeks reproducibility.

It seems that you can also specify tags and add them to submodules.

Terminal window
# 1. クローンしてタグをチェックアウト
git clone https://github.com/user/other-repo.git
cd other-repo
git checkout tags/v1.0.0
# 2. 必要なコミットにいる状態で、上位リポジトリに追加
cd ..
git submodule add ./other-repo path/to/submodule

If so, tagging and release may be necessary.

I would like to be able to create a release by tagging it with Github Action.

It was released

Hugo theme called Hugo-Passage.


More Posts
My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


Comments