Skip to content

Commit 8f83d16

Browse files
✨ update release readme
1 parent 364af03 commit 8f83d16

File tree

1 file changed

+132
-19
lines changed

1 file changed

+132
-19
lines changed

RELEASE.md

Lines changed: 132 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,138 @@
1-
# Releasing
1+
Follow these steps to ensure a smooth and consistent release process.
22

3-
## Libraries
3+
## 1. Create a Release Ticket
44

5-
### Prepare
5+
- Open a new release ticket (issue) in your project management tool.
6+
- Note the ticket/issue number for use in the release branch name.
67

7-
This can be done from develop or seperate release branches (before merging to develop)
8+
## 2. Create a New Release Branch
89

9-
1. Change the version-number in accordance with the magnitude of change.
10-
1. If its not a `@latest` release, the type should be "dashed", for example; `0.0.0-beta` or `0.0.0-dev.20210101`.
11-
2. We try to follow [semver](https://semver.org/) but are holding back major v1 until we feel its ready.
12-
2. Update the changelog for your library in `CHANGELOG.md`.
13-
1. Follow the guide in the changelog file.
14-
3. Add a [release on github](https://github.com/equinor/design-system/releases) with the changes you added in `CHANGELOG.md`.
15-
1. Name the release in accordance with package name and version, for example; `[email protected]`
10+
- In your terminal, create a new branch for the release using the following command:
1611

17-
### Publish
12+
```bash
13+
git checkout -b release-[ticket/issue number]
14+
```
1815

19-
1. Find the corresponding workflow for your library, usually prepended with "Publish \<LIBRARY NAME\>".
20-
2. "Run workflow" and decide if input values need to be changed.
21-
1. Storybok slot: If present, choose which environment Storybook should be updated.
22-
1. _Leave this input *empty* for deployment to production_
23-
2. NPM tag: Choose which tag to apply to the published package
24-
1. _Choose `latest` for production release_
25-
3. ⚠️ Check "Publish eds-\<LIBRARY NAME\> to npm" step to verify the package was actually published. **_If an existing version exists on npmjs.org, the package will not be published, but this step will still pass._**
16+
- Replace `[ticket/issue number]` with the actual number. For example: `release-3692`.
17+
18+
## 3. Generate Release Notes
19+
20+
- Navigate to the **code** section on GitHub and go to **Releases**.
21+
- Click **Draft New Release**.
22+
23+
- **Name the Release**: Use the naming convention `eds-core-react@[version]`. Replace `[version]` with the new version number.
24+
- **Tag Creation**: Select **Create a new tag on publish**.
25+
- **Generate Release Notes**:
26+
27+
- Automatically generate the release notes.
28+
- Copy and paste the generated notes into the `CHANGELOG.md` file in your new release branch.
29+
- Filter out commits unrelated to the release, such as updated dev dependencies, changes to GitHub actions, etc.
30+
- Review and modify the notes to match the existing format, improving commit messages if needed.
31+
32+
- Save the release as a **Draft**.
33+
34+
## 4. Update the Version Number
35+
36+
- Open the `package.json` file.
37+
- Update the version number to the new release version.
38+
39+
## 5. Commit Changes
40+
41+
- Stage the changes and commit them with a clear message:
42+
43+
```bash
44+
git commit -m "🔖 Release eds-core-react@[version]"
45+
```
46+
47+
- Replace `[version]` with the version number, e.g., `0.42.5`.
48+
49+
## 6. Create a Pull Request (PR)
50+
51+
- Open a pull request for the new release branch.
52+
- In the PR description, include a reference to the release ticket: `resolves #[ticket/issue number]`.
53+
54+
## 7. Run GitHub Actions to Publish
55+
56+
- Go to **GitHub Actions**.
57+
- Find the **Publish [package]** workflow.
58+
- **Run the Workflow**:
59+
- Select the release branch you created.
60+
- **Tag for npm**: Use `latest`.
61+
- **Environment for Storybook**: Set to `production`.
62+
- Ensure the workflow runs successfully by reviewing the action logs.
63+
64+
## 8. Merge Pull Request to Develop
65+
66+
- Once the release is published successfully, merge the pull request into the `develop` branch.
67+
- Include all changed packages in the release title for clarity.
68+
69+
## 9. Publish the Release
70+
71+
- Go back to **Releases** on GitHub.
72+
- Publish the release. Ensure that all packages with changes have a unique release.
73+
74+
## 10. Update Master and Push Changes
75+
76+
- Switch to the `master` branch:
77+
78+
```bash
79+
git checkout master
80+
```
81+
82+
- Rebase `master` with the latest changes from `develop`:
83+
84+
```bash
85+
git rebase develop
86+
```
87+
88+
- Push the updates to the remote repository:
89+
90+
```bash
91+
git push
92+
```
93+
94+
---
95+
96+
## 11. Verify
97+
98+
- Verify the new version is available on [npmjs](https://www.npmjs.com/package/@equinor/eds-core-react?activeTab=versions).
99+
- Verify the new [storybook](https://storybook.eds.equinor.com/) is published.
100+
101+
## 12. Celebrate
102+
103+
- Announce the release in #eds-design-system
104+
Here's a template for future release announcements:
105+
106+
---
107+
108+
We've just released:
109+
110+
- **[package-name-1] v[version-number-1]**
111+
- **[package-name-2] v[version-number-2]**
112+
113+
### **[Package-Name-1]:**
114+
115+
**Added**
116+
117+
-[Feature-1]: [Short description of the feature] by @[author]
118+
-[Feature-2]: [Short description of the feature] by @[author]
119+
120+
**Fixed**
121+
122+
- 🐛 [Fix-1]: [Short description of the fix] by @[author]
123+
- 🐛 [Fix-2]: [Short description of the fix] by @[author]
124+
125+
### **[Package-Name-2]:**
126+
127+
**Added**
128+
129+
-[Feature-1]: [Short description of the feature] by @[author]
130+
131+
> Note: [Include any important dependency or compatibility notes here.]
132+
133+
---
134+
135+
**Best,**
136+
The EDS Core Team
137+
138+
---

0 commit comments

Comments
 (0)