Skip to content

Commit 8bfff83

Browse files
authored
Update course format for accessibility (#45)
* Update course format for accessibility * outline step files * More automatic fixes * Manual fixes * manual fixes * run prettier * manual fixes * manual fixes
1 parent 9d0881d commit 8bfff83

27 files changed

+1684
-1387
lines changed

.github/changes/engine.js

+244-199
Large diffs are not rendered by default.

.github/changes/game-fixed.js

+200-146
Large diffs are not rendered by default.

.github/changes/game-with-bug.js

+200-146
Large diffs are not rendered by default.

.github/pull_request_template.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
## Description:
2-
_Description of changes made and why._
1+
## Description:
2+
3+
_Description of changes made and why._
File renamed without changes.

.github/steps/0-welcome.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- readme -->
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!--Step 1-->
2+
3+
## Step 1: Create a beta release
4+
5+
_Welcome to "Release-based workflow" :sparkle:_
6+
7+
### The GitHub flow
8+
9+
The [GitHub flow](https://guides.github.com/introduction/flow/) is a lightweight, branch-based workflow for projects with regular deployments.
10+
11+
![github-flow](https://user-images.githubusercontent.com/6351798/48032310-63842400-e114-11e8-8db0-06dc0504dcb5.png)
12+
13+
Some projects may deploy more often, with continuous deployment. There might be a "release" every time there's a new commit on main.
14+
15+
But, some projects rely on a different structure for versions and releases.
16+
17+
### Versions
18+
19+
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".
20+
21+
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.
22+
23+
### :keyboard: Activity: Create a release for the current codebase
24+
25+
In this step, you will create a release for this repository on GitHub.
26+
27+
GitHub Releases point to a specific commit. Releases can include release notes in Markdown files, and attached binaries.
28+
29+
Before using a release based workflow for a larger release, let's create a tag and a release.
30+
31+
1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
32+
1. Go to the **Releases** page for this repository.
33+
- _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._
34+
1. Click **Create a new release**.
35+
1. In the field for _Tag version_, specify a number. In this case, use **v0.9**. Keep the _Target_ as **main**.
36+
1. Give the release a title, like "First beta release". If you'd like, you could also give the release a short description.
37+
1. Select the checkbox next to **Set as a pre-release**, since it is representing a beta version.
38+
1. Click **Publish release**.
39+
40+
### :keyboard: Activity: Introduce a bug to be fixed later
41+
42+
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.
43+
44+
1. Open a **new pull request** with `base: release-v1.0` and `compare: update-text-colors`.
45+
1. Set the pull request title to "Updated game text style". You can include a detailed pull request body, an example is below:
46+
```
47+
## Description:
48+
- Updated game text color to green
49+
```
50+
1. Click **Create pull request**.
51+
1. We'll merge this pull request now. Click **Merge pull request** and delete your branch.
52+
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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--Step 2-->
2+
3+
## Step 2: Add a new feature to the release branch
4+
5+
_Great job creating a beta release :heart:_
6+
7+
### Release management
8+
9+
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.
10+
11+
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.
12+
13+
No one strategy is better than another. We always recommend being intentional about branches and reducing long-lived branches whenever possible.
14+
15+
In this exercise, you'll use the `release-v1.0` branch to be your one long-lived branch per release version.
16+
17+
### Protected branches
18+
19+
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.
20+
21+
### Add a feature
22+
23+
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.
24+
25+
- You should update the page background color to black.
26+
- I'll help you change the text colors to green.
27+
28+
### :keyboard: Activity: Update `base.css`
29+
30+
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.
31+
32+
```
33+
body {
34+
background-color: black;
35+
}
36+
```
37+
38+
1. Open a pull request with `release-v1.0` as the `base` branch, and your new branch as the `compare` branch.
39+
1. Fill in the pull request template to describe your changes.
40+
1. Click **Create pull request**.
41+
42+
### Merge the new feature to the release branch
43+
44+
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.
45+
46+
Merge this feature pull request so that you can open the release pull request as early as possible.
47+
48+
### :keyboard: Activity: Merge the pull request
49+
50+
1. Click **Merge pull request**, and delete your branch.
51+
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.

.github/steps/3-release-pr-opened.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--Step 3-->
2+
3+
## Step 3: Open a release pull request
4+
5+
_Nice work adding a new feature :smile:_
6+
7+
### Release branches and `main`
8+
9+
You should open a pull request between your release branch and main as early as possible. It might be open for a long time, and that's okay.
10+
11+
In general, the pull request description can include:
12+
13+
- A [reference to an issue](https://docs.github.com/en/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams) that the pull request addresses.
14+
- A description of the changes proposed in the pull request.
15+
- [@mentions](https://docs.github.com/en/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams) of the person or team responsible for reviewing proposed changes.
16+
17+
To expedite the creation of this pull request, I've added a pull request template to the repository. When you create a pull request, default text will automatically be displayed. This should help you identify and fill out all the necessary information. If you don't want to use the template content, just remove the text from the pull request and repace it with your pull request message.
18+
19+
### :keyboard: Activity: Open a release pull request
20+
21+
Let's make a new pull request comparing the `release-v1.0` branch to the `main` branch.
22+
23+
1. Open a **new pull request** with `base: main` and `compare: release-v1.0`.
24+
1. Ensure the title of your pull request is "Release v1.0".
25+
1. Include a detailed pull request body, an example is below:
26+
```
27+
## Description:
28+
- Changed page background color to black.
29+
- Changed game text color to green.
30+
```
31+
1. Click **Create pull request**.
32+
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.
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--Step 4-->
2+
3+
## Step 4: Generate release notes and merge
4+
5+
_Thanks for opening that pull request :dancer:_
6+
7+
### Automatically generated release notes
8+
9+
[Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) provide an automated alternative to manually writing release notes for your GitHub releases. With automatically generated release notes, you can quickly generate an overview of the contents of a release. Automatically generated release notes include a list of merged pull requests, a list of contributors to the release, and a link to a full changelog. You can also customize your release notes once they are generated.
10+
11+
### :keyboard: Activity: Generate release notes
12+
13+
1. In a separate tab, go to the **Releases** page for this repository.
14+
- _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._
15+
1. Click the **Draft a new release** button.
16+
1. In the field for _Tag version_, specify `v1.0.0`.
17+
1. To the right of the tag dropdown, click the _Target_ dropddown and select the `release-v1.0` branch.
18+
- _Tip: This is temporary in order to generate release notes based on the changes in this branch._
19+
1. To the top right of the description text box, click **Generate release notes**.
20+
1. Review the release notes in the text box and customize the content if desired.
21+
1. Set the _Target_ branch back to the `main`, as this is the branch you want to create your tag on once the release branch is merged.
22+
1. Click **Save draft**, as you will publish this release in the next step.
23+
24+
You can now [merge](https://docs.github.com/en/get-started/quickstart/github-glossary#merge) your pull request!
25+
26+
### :keyboard: Activity: Merge into main
27+
28+
1. In a separate tab, go to the **Pull requests** page for this repository.
29+
1. Open your **Release v1.0** pull request.
30+
1. Click **Merge pull request**.
31+
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.

.github/steps/5-finalize-release.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!--Step 5-->
2+
3+
## Step 5: Finalize the release
4+
5+
_Awesome work on the release notes :+1:_
6+
7+
### Finalizing releases
8+
9+
It's important to be aware of the information what will be visible in that release. In the pre-release, the version and commit messages are visible.
10+
11+
![image](https://user-images.githubusercontent.com/13326548/47883578-bdba7780-ddea-11e8-84b8-563e12f02ca6.png)
12+
13+
### Semantic versioning
14+
15+
Semantic versioning is a formal convention for specifying compatibility. It uses a three-part version number: **major version**; **minor version**; and **patch**. Version numbers convey meaning about the underlying code and what has been modified. For example, versioning could be handled as follows:
16+
17+
| Code status | Stage | Rule | Example version |
18+
| ------------------------------- | ------------- | ---------------------------------------------------------------------- | --------------- |
19+
| First release | New product | Start with 1.0.0 | 1.0.0 |
20+
| Backward compatible fix | Patch release | Increment the third digit | 1.0.1 |
21+
| Backward compatible new feature | Minor release | Increment the middle digit and reset the last digit to zero | 1.1.0 |
22+
| Breaking updates | Major release | Increment the first digit and reset the middle and last digits to zero | 2.0.0 |
23+
24+
Check out this article on [Semantic versioning](https://semver.org/) to learn more.
25+
26+
### Finalize the release
27+
28+
Now let's change our recently automated release from _draft_ to _latest release_.
29+
30+
### :keyboard: Activity: Finalize release
31+
32+
1. In a separate tab, go to the **Releases** page for this repository.
33+
- _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._
34+
1. Click the **Edit** button next to your draft release.
35+
1. Ensure the _Target_ branch is set to `main`.
36+
1. Click **Publish release**.
37+
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.

.github/steps/6-commit-hotifx.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--Step 6-->
2+
3+
## Step 6: Commit a hotfix to the release
4+
5+
_Almost there :heart:_
6+
7+
Notice that I didn't delete the branch? That's intentional.
8+
9+
Sometimes mistakes can happen with releases, and we'll want to be able to correct them on the same branch.
10+
11+
Now that your release is finalized, we have a confession to make. Somewhere in our recent update, I made a mistake and introduced a bug. Instead of changing the text colors to green, we changed the whole game background.
12+
13+
_Tip: Sometimes GitHub Pages takes a few minutes to update. Your page might not immediately show the recent updates you've made._
14+
15+
![image](https://user-images.githubusercontent.com/13326548/48045461-487dd800-e145-11e8-843c-b91a82213eb8.png)
16+
17+
"Hotfixes", or a quick fix to address a bug in software, are a normal part of development. Oftentimes you'll see application updates whose only description is "bug fixes".
18+
19+
When bugs come up after you release a version, you'll need to address them. We've already created a `hotfix-v1.0.1` and `fix-game-background` branches for you to start.
20+
21+
We'll submit a hotfix by creating and merging the pull request.
22+
23+
### :keyboard: Activity: Create and merge the hotfix pull request
24+
25+
1. Open a pull request with `hotfix-v1.0.1` as the `base` branch, and `fix-game-background` as the `compare` branch.
26+
1. Fill in the pull request template to describe your changes. You can set the pull request title to "Hotfix for broken game style". You can include a detailed pull request body, an example is below:
27+
```
28+
## Description:
29+
- Fixed bug, set game background back to black
30+
```
31+
1. Review the changes and click **Create pull request**.
32+
1. We want to merge this into our hotfix branch now so click **Merge pull request**.
33+
34+
Now we want these changes merged into `main` as well so let's create and merge a pull request with our hotfix to `main`.
35+
36+
### :keyboard: Activity: Create the release pull request
37+
38+
1. Open a pull request with `main` as the `base` branch, and `hotfix-v1.0.1` as the `compare` branch.
39+
1. Ensure the title of your pull request is "Hotfix v1.0.1".
40+
1. Include a detailed pull request body, an example is below:
41+
```
42+
## Description:
43+
- Fixed bug introduced in last production release - set game background back to black
44+
```
45+
1. Review the changes and click **Create pull request**.
46+
1. Click **Merge pull request**.
47+
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.
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--Step 7-->
2+
3+
## Step 7: Create release v1.0.1
4+
5+
_One last step to go!_
6+
7+
### A final release
8+
9+
You updated the source code, but users can't readily access your most recent changes. Prepare a new release, and distribute that release to the necessary channels.
10+
11+
### Create release v1.0.1
12+
13+
With descriptive pull requests and auto generated release notes, you don't have to spend a lot of time working on your release draft. Follow the steps below to create your new release, generate the release notes, and publish.
14+
15+
### :keyboard: Activity: Complete release
16+
17+
1. In a separate tab, go to to the **Releases** page for this repository.
18+
- _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._
19+
1. Click the **Draft a new release** button.
20+
1. Set the _Target_ branch to `main`.
21+
- _Tip: Practice your semantic version syntax. What should the tag and title for this release be?_
22+
1. To the top right of the description text box, click **Generate release notes**.
23+
1. Review the release notes in the text box and customize the content if desired.
24+
1. Click **Publish release**.
25+
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.

.github/steps/X-finish.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Finish
2+
3+
<img src="https://octodex.github.com/images/snowtocat_final.jpg" alt=celebrate width=300 align=right>
4+
5+
### Congratulations friend, you've completed this course!
6+
7+
Here's a recap of all the tasks you've accomplished in your repository:
8+
9+
- Create a beta release.
10+
- Add a new feature to the release branch.
11+
- Open a release pull request
12+
- Automate release notes.
13+
- Merge and finalize the release branch.
14+
- Commit a hotfix to the release.
15+
- Create release v1.0.1.
16+
17+
### What's next?
18+
19+
- [We'd love to hear what you thought of this course](https://github.com/skills/.github/discussions).
20+
- [Take another GitHub Skills course](https://github.com/skills).
21+
- [Read the GitHub Getting Started docs](https://docs.github.com/en/get-started).
22+
- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore).

0 commit comments

Comments
 (0)