Tags and releases updates

This commit is contained in:
n 2021-03-06 18:48:28 +09:00 committed by Gitea
parent f4feca6984
commit 020316ccbd

View file

@ -6,23 +6,28 @@ eleventyNavigation:
order: 60
---
## What are tags and releases?
Tags are a git function used to show where a repository was during a certain release (e.g. v1.2.4), sort of like a shortcut to what it looked like at the time. Tags always include a source code download for that time, and are usually paired with a release (e.g. an EXE or DMG file) when applicable.
## What are tags?
Tags are a git function used to make a snapshot of a repository. It is generally used to mark releases (e.g. v1.2.4), and functions like a shortcut to what the repo looked like at the time.
## What are releases?
Releases are a feature independent of Git that allows you to attach files and release notes along and share it on Codeberg, linking to a Git tag.
### Wait, what is the difference between tags and releases?
They are very similar, the difference being that tags are just the repository frozen in time and are part of git (You can make one using git), releases are tags accompanied with a binary file and are not part of git (You need to go to your Codeberg repository page to add the binary).
## Making new tags
## Creating tags and releases
If you want to create tags it is recommended to do it using Git. You can also create tags during the release creation process on Codeberg. Releases can only be created from Codeberg.
### Codeberg
See [Creating a release](/collaborating/citable-code/#creating-a-release)
> Tags are generally labelled by version numbers. It is good practice to prefix a version number with a `v` (e.g. `v1.2.3`) and to use the [Semantic Versioning](https://semver.org/) specification for assigning and incrementing version numbers.
### Git<br>
To create a tag using git, enter
```git
### On Git
To create a tag using git, use the following command in your repo folder.
```bash
git tag -a <version number here> -m "<my tag name>"
```
It is good practice to prefix the version number with a `v` (e.g. `v1.2.3`) and to use [semantic versioning](https://semver.org/). It should also be noted that this method will not allow you to add a binary file, you will need to go to your repo page for that.
### On Codeberg
See the [creating a release](/collaborating/citable-code/#creating-a-release) segment on the citable code article for instructions on creating tags and releases on Codeberg.
## Finding and viewing releases in a repository
<picture>
@ -30,5 +35,5 @@ It is good practice to prefix the version number with a `v` (e.g. `v1.2.3`) and
<img src="/assets/images/git/using-tags/tags.png" alt="tags">
</picture>
To view the release, go to the releases tab (1) in the repository. Then locate the release you want to view. For example, we will be looking at the `Added Knut!` release (2). If you just want to access the files attached to the release, you can download it from the `Downloads` dropdown (3).
To view the release, go to the releases tab (1) in the repository. Then locate the release you want to view. As an example, we will be looking at the `Added Knut!` release (2). If you just want to access the files attached to the release, you can download it from the `Downloads` dropdown (3).
If you want to see a snapshot of the source code at the time of the release, select a source code archive download (5) from the `Downloads` dropdown or click on the tag on the left side (5).