Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/release-process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Release process
This diagram below represents the release process for MetaMask Extension and MetaMask Mobile clients.

```mermaid
graph TD

%% Nodes outside subgraphs %%
RUN[Runway] -->|every 2 weeks| CURRENT0
CURRENT1 --> |create PR| bump1[GitHub Action creates version bump PR for the main branch]
bump1 -->|merge PR| MAIN1
CURRENT6 --> BUG1[A bug is found]
BUG1 --> BUG2[A fix is done on 'main' branch]
BUG2 --> CURRENT7
FEAT[For every change, new features or fixes, engineers first open PRs on 'main'] -->|merge PR| MAIN1

%% Subgraphs %%
subgraph Main [Main developement branch: 'main']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we still generating commits.csv as part of the release process or was that deprecated? If used where does it come into play?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need commits.csv to generate the changelog PR in the create-release-pr GitHub Action.

style Main fill:#4d0808,stroke:#000,stroke-width:2px,color:#fff
MAIN1[All changes are first made on 'main' branch]
end

subgraph Previous [Previous release branch: 'release/x.y-1.z']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is getting cut off a bit in the diagram. Can we move it a little?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't think we can easily move choose texts' positions on a mermaid diagram (at least I didn't figure out how to).

style Previous fill:#08084d,stroke:#000,stroke-width:2px,color:#fff

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit hard to see the lines and where they're pointing in the dark blue background. Can we change the color of that background square or lines so that they're more visible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmh.. for me it was the opposite, I had to use dark background colors on purpose in order to see the white arrows. Are the arrows not white on you side?
Screenshot 2025-08-29 at 16 24 03

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot better in that screenshot. Maybe I was looking in the wrong place. Did you do anything or navigate somewhere to see it like that?

PREVIOUS1[Previous release is merged into 'stable' branch]
PREVIOUS1 --> PREVIOUS2['Stable Branch Sync' GitHun Action creates stable sync PR]
PREVIOUS2 -->|create PR| PREVIOUS3[Release engineer reviews and merges stable sync PR]
PREVIOUS3 -->|merge PR| MAIN1
end

subgraph HotFix [Hotfix release branch: 'release/x.y-1.z+1']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is getting cut off a bit in the diagram as well. Can we move it a little?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't think we can easily move choose texts' positions on a mermaid diagram (at least I didn't figure out how to).

style HotFix fill:#08084d,stroke:#000,stroke-width:2px,color:#fff
HOTFIX1[Hot fix release is merged into 'stable' branch]
HOTFIX1 --> HOTFIX2['Stable Branch Sync' GitHun Action creates stable sync PR]
HOTFIX2 -->|create PR| HOTFIX3[Release engineer reviews and merges stable sync PR]
HOTFIX3 -->|merge PR| MAIN1
end

subgraph Current [Current release branch: 'release/x.y.z']
style Current fill:#08084d,stroke:#000,stroke-width:2px,color:#fff
CURRENT0[Runway automatically creates a new release branch based off of 'main' branch, called 'release/x.y.z']
CURRENT0 --> CURRENT1['Create Release Pull Request' GitHub Action is automatically executed]
CURRENT1 -->|create PR| changelog1[GitHub Action creates x.y.z changelog PR]
CURRENT1 --> CURRENT2[GitHub Action creates x.y.z release PR]
changelog1 -->|update PR| changelog2[Release Engineer reviews, adjusts, and merges x.y.z changelog PR]
changelog2 -->|merge PR| CURRENT4
CURRENT2 --> CURRENT5
CURRENT3[Release Engineer creates and merges stable sync PR into 'release/x.y.z branch'] -->|merge PR| CURRENT4
CURRENT4[A commit is added to 'release/x.y.z' branch] --> CURRENT5[A new release build is automatically created and posted on the x.y.z release PR]
CURRENT5 --> CURRENT6[Release is tested by all teams]
PREVIOUS1 --> CURRENT3
HOTFIX1 --> CURRENT3
CURRENT7[Release Engineer cherry-picks fixes on 'release/x.y.z' branch]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We mentioned cherry picks today during part of the release process. Does the cherry picking only happen during a hotfix?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we update the changelog again after this as well?

Copy link
Contributor Author

@gauthierpetetin gauthierpetetin Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do cherry picks every time code needs to be added to a release branch after the initial release branch creation.

Example:

  • Release branch is created for release x.y.z
  • We test the release and find a bug
  • Bug is fixed on main branch
  • Then we cherry-pick the fix on the release branch
  • Then we update the changelog accordingly on the release branch

So cherry-picks happen for any kind of releases, not only hotfixes.

CURRENT6 --> CURRENT8[Release is approved by all teams]
CURRENT7 --> CURRENT8
CURRENT8 --> CURRENT9[Release is approved by Release Engineer, Release QA, and Release Manager]
CURRENT9 --> CURRENT10['Tag Release Branch' GitHub Action is triggered by Release Engineer]
CURRENT10 --> CURRENT11[Release tag is added on the release branch]
CURRENT11 --> CURRENT12[Release engineer merges x.y.z release PR into 'stable' branch]
end

subgraph Stable [Stable branch: 'stable']
style Stable fill:#26084d,stroke:#000,stroke-width:2px,color:#fff
CURRENT12 -->|merge PR| STABLE1[A new production build is automatically created and posted on the repo's releases page]
STABLE1 --> STABLE2[Release Engineer submits x.y.z production build to the store]
end

subgraph Next [Next release branch: 'release/x.y+1.z']
style Next fill:#08084d,stroke:#000,stroke-width:2px,color:#fff
STABLE2 --> NEXT1[Runway automatically creates a new release branch from main, called 'release/x.y+1.z']
end
Loading