You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-37Lines changed: 34 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,62 +16,59 @@ _Create a release based workflow that is built on the foundations of the GitHub
16
16
</header>
17
17
18
18
<!--
19
-
<<< Author notes: Step 1 >>>
20
-
Choose 3-5 steps for your course.
21
-
The first step is always the hardest, so pick something easy!
22
-
Link to docs.github.com for further explanations.
23
-
Encourage users to open new tabs for steps!
19
+
<<< Author notes: Step 2 >>>
20
+
Start this step by acknowledging the previous step.
21
+
Define terms and link to docs.github.com.
24
22
-->
25
23
26
-
## Step 1: Create a beta release
24
+
## Step 2: Add a new feature to the release branch
27
25
28
-
_Welcome to "Release-based workflow" :sparkle:_
26
+
_Great job creating a beta release :heart:_
29
27
30
-
### The GitHub flow
28
+
### Release management
31
29
32
-
The [GitHub flow](https://guides.github.com/introduction/flow/) is a lightweight, branch-based workflow for projects with regular deployments.
30
+
As you prepare for a future release, you'll need to organize more than the tasks and features. It's important to create a clear workflow for your team, and to make sure that the work remains organized.
There are several strategies for managing releases. Some teams might use long-lived branches, like `production`, `dev`, and `main`. Some teams use simple feature branches, releasing from the main branch.
35
33
36
-
Some projects may deploy more often, with continuous deployment. There might be a "release" every time there's a new commit on main.
34
+
No one strategy is better than another. We always recommend being intentional about branches and reducing long-lived branches whenever possible.
37
35
38
-
But, some projects rely on a different structure for versions and releases.
36
+
In this exercise, you'll use the `release-v1.0` branch to be your one long-lived branch per release version.
39
37
40
-
### Versions
38
+
### Protected branches
41
39
42
-
Versions are different iterations of updated software like operating systems, apps, or dependencies. Common examples are "Windows 8.1" to "Windows 10", or "macOS High Sierra" to "macOS Mojave".
40
+
Like the `main` branch, you can protect release branches. This means you can protect branches from force pushes or accidental deletion. This is already configured in this repository.
43
41
44
-
Developers update code and then run tests on the project for bugs. During that time, the developers might set up certain securities to protect from new code or bugs. Then, the tested code is ready for production. Teams version the code and release it for installation by end users.
42
+
### Add a feature
45
43
46
-
### :keyboard: Activity: Create a release for the current codebase
44
+
Releases are usually made of many smaller changes. Let's pretend we don't know about the bug we added earlier and we'll focus on a few features to update our game before the version update.
47
45
48
-
In this step, you will create a release for this repository on GitHub.
46
+
- You should update the page background color to black.
47
+
- I'll help you change the text colors to green.
49
48
50
-
GitHub Releases point to a specific commit. Releases can include release notes in Markdown files, and attached binaries.
49
+
### :keyboard: Activity: Update `base.css`
51
50
52
-
Before using a release based workflow for a larger release, let's create a tag and a release.
51
+
1. Create a new branch off of the `main` branch and change the `body` CSS declaration in `base.css` to match what is below. This will set the page background to black.
53
52
54
-
1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
55
-
1. Go to the **Releases** page for this repository.
56
-
-_Tip: To reach this page, click the **Code** tab at the top of your repository. Then, find the navigation bar below the repository description, and click the **Releases** heading link._
57
-
1. Click **Create a new release**.
58
-
1. In the field for _Tag version_, specify a number. In this case, use **v0.9**. Keep the _Target_ as **main**.
59
-
1. Give the release a title, like "First beta release". If you'd like, you could also give the release a short description.
60
-
1. Select the checkbox next to **Set as a pre-release**, since it is representing a beta version.
61
-
1. Click **Publish release**.
53
+
```
54
+
body {
55
+
background-color: black;
56
+
}
57
+
```
62
58
63
-
### :keyboard: Activity: Introduce a bug to be fixed later
59
+
1. Open a pull request with `release-v1.0` as the `base` branch, and your new branch as the `compare` branch.
60
+
1. Fill in the pull request template to describe your changes.
61
+
1. Click **Create pull request**.
64
62
65
-
To set the stage for later, let's also add a bug that we'll fix as part of the release workflow in later steps. We've already created a `update-text-colors`branch for you so let's create and merge a pull request with this branch.
63
+
### Merge the new feature to the release branch
66
64
67
-
1. Open a **new pull request** with `base: release-v1.0` and `compare: update-text-colors`.
68
-
1. Set the pull request title to "Updated game text style". You can include a detailed pull request body, an example is below:
69
-
```
70
-
## Description:
71
-
- Updated game text color to green
72
-
```
73
-
1. Click **Create pull request**.
74
-
1. We'll merge this pull request now. Click **Merge pull request** and delete your branch.
65
+
Even with releases, the GitHub flow is still an important strategy for working with your team. It's a good idea to use short-lived branches for quick feature additions and bug fixes.
66
+
67
+
Merge this feature pull request so that you can open the release pull request as early as possible.
68
+
69
+
### :keyboard: Activity: Merge the pull request
70
+
71
+
1. Click **Merge pull request**, and delete your branch.
75
72
1. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
0 commit comments