Skip to content

Commit 9e69fef

Browse files
authored
Merge pull request #45 from githubtraining/tags-and-releases
Tags and Releases: create tags and releases page for github games repo
2 parents 7ae60b1 + 32e0755 commit 9e69fef

6 files changed

Lines changed: 38 additions & 1 deletion

book/17_tags_and_releases.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Tags and Releases
2+
3+
You may want to put tags or releases on certain commits in your code's history to mark specific states or places in time. To do this, you could use Git's **tag** feature, or you could use GitHub's **release** feature.
4+
5+
### Tags
6+
7+
A tag is a pointer that points to a specific commit. Unlike commits, tags are _not_ immutable. They can be moved and changed. Let's practice a bit with tags.
8+
9+
Tags can be created locally with Git, or on GitHub. When creating a tag from the command line, it's recommended to create an "annotated" tag. The following example creates an annotated tag with the `-a` flag, names the tag `v1.0`, and connects it to whichever commit SHA is included.
10+
11+
- `git tag -a v1.0 <SHA>`
12+
13+
To see all tags, type `git tag --list`.
14+
15+
Another caveat with tags is that they are not automatically pushed up with commits. To push tags, type `git push --tags`.
16+
17+
You can also set this as a default with configs using `git config push.followTags true` which will automatically push tags when their associated commits are pushed. [Read more about this config setting.](https://git-scm.com/docs/git-config/2.4.1#git-config-pushfollowTags).
18+
19+
### Releases
20+
21+
Releases are a GitHub feature that allow you to add an executable to the tag for easier access by visitors who just want to download and install your software. Releases are tags, because they point to a specific commit and can be named like any other tag. However, releases can also include attached binaries.
22+
23+
### Add a Release to GitHub-Games
24+
25+
1. On GitHub, navigate to the **Code** tab of the repository.
26+
1. Under your repository name, click Releases.
27+
1. Click Draft a new release.
28+
1. Type a name for the tag. We recommend you use semantic versioning.
29+
1. Select a branch that contains the project you want to release. Usually, you'll want to release against your master branch, unless you're releasing beta software. You can also select a recent commit by choosing the recent commits tab.
30+
1. Type a title and description that describes your release.
31+
1. If you're ready to publicize your release, click Publish release. Otherwise, click Save draft to work on it later.
32+
33+
> Notice that you could drag and drop or select files manually in the binaries box, or select "This is a pre-release" to notify users that it's not ready for production.

book/SUMMARY_CICDONLY_CIRCLE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* [Helpful Git Commands](16_helpful_git_commands.md)
3030
* [Viewing Local Changes](17_view_local_changes.md)
3131
* [Changing the `.yml` file](34_change_yml.md)
32+
* [Tags & Releases](17_tags_and_releases.md)
3233
* [Workflow Discussion](17_workflow_discussion.md)
3334

3435
## Project 4: Starting From Scratch

book/SUMMARY_CICDONLY_TRAVIS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* [Helpful Git Commands](16_helpful_git_commands.md)
3030
* [Viewing Local Changes](17_view_local_changes.md)
3131
* [Changing the `.yml` file](34_change_yml.md)
32+
* [Tags & Releases](17_tags_and_releases.md)
3233
* [Workflow Discussion](17_workflow_discussion.md)
3334

3435
## Project 4: Starting From Scratch

book/SUMMARY_CICD_FULLGH4D_CIRCLE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* [Reverting Commits](15_reverting_commits.md)
2929
* [Helpful Git Commands](16_helpful_git_commands.md)
3030
* [Viewing Local Changes](17_view_local_changes.md)
31+
* [Tags & Releases](17_tags_and_releases.md)
3132
* [Workflow Discussion](17_workflow_discussion.md)
3233

3334
## Project 4: Adding More Tests

book/SUMMARY_CICD_FULLGH4D_TRAVIS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* [Reverting Commits](15_reverting_commits.md)
2929
* [Helpful Git Commands](16_helpful_git_commands.md)
3030
* [Viewing Local Changes](17_view_local_changes.md)
31+
* [Tags & Releases](17_tags_and_releases.md)
3132
* [Workflow Discussion](17_workflow_discussion.md)
3233

3334
## Project 4: Adding More Tests
@@ -47,4 +48,3 @@
4748
* [Day 1 Activity Instructions](app_Day_1_activities.md)
4849
* [Workflow Guide](App_a_workflow_guide.md)
4950
* [End of Training: Cleaning Loaner PCs](App_clean_loaner_pc.md)
50-

book/SUMMARY_GH4D.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* [Reverting Commits](15_reverting_commits.md)
2525
* [Helpful Git Commands](16_helpful_git_commands.md)
2626
* [Viewing Local Changes](17_view_local_changes.md)
27+
* [Tags & Releases](17_tags_and_releases.md)
2728
* [Workflow Discussion](17_workflow_discussion.md)
2829

2930
## Project 4: Local Repository

0 commit comments

Comments
 (0)