Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
acc6082
feat(gh-actions): unify version release workflows
alucardzom Jun 10, 2025
efa39e0
chore(prettier): executed on the gh workflow
alucardzom Jun 10, 2025
dc8d22a
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jun 10, 2025
8ef8ad7
chore: set SHA github-tools same as script has
alucardzom Jun 11, 2025
5ec60d2
chore(stable): added compatibility with stable branch
alucardzom Jun 11, 2025
e509d66
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jun 11, 2025
a09dc87
chore(prettier): run it for codeql
alucardzom Jun 11, 2025
b6f1968
chore: rename release/v to release/
alucardzom Jun 11, 2025
1e0f5ba
chore(fix): fix extract version for bug report
alucardzom Jun 24, 2025
4311c64
chore(ts): update close release bug report issue ts script
alucardzom Jun 24, 2025
2743ced
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jun 24, 2025
7cd5da9
chore(prerelease): add also compatibility with the new branch
alucardzom Jun 24, 2025
bc72aed
chore(gh-action): remove duplicated block pr release
alucardzom Jun 24, 2025
00ff911
chore: update create pr
alucardzom Jul 4, 2025
3cbd31a
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jul 4, 2025
e72dd82
chore: remove unused input
alucardzom Jul 4, 2025
a8807c2
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jul 4, 2025
89bcb5a
chore: added info
alucardzom Jul 4, 2025
406a0e3
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jul 9, 2025
dcae6ec
chore: fix typo oin create-bug-report yaml
alucardzom Jul 11, 2025
af1430b
chore: restore create release to execute last stable branch
alucardzom Jul 14, 2025
77bbf07
chore: forgot to add the prefix
alucardzom Jul 14, 2025
6b00dea
chore: restore value
alucardzom Jul 14, 2025
c59ae7c
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jul 17, 2025
63e4649
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jul 18, 2025
3afb402
Merge branch 'main' into ale/unify-release-branch-naming
alucardzom Jul 21, 2025
24d6dae
chore: added control on 2 more workflows
alucardzom Jul 30, 2025
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
Next Next commit
feat(gh-actions): unify version release workflows
For unifiying the release branch naming between extension and mobile, we
must upgrade some workflows and scripts to make it compatible.

We also keep the retrocompatibility between the current workflow, and
the new one, ensuring the process works smoothly and without
interruptions.
  • Loading branch information
alucardzom committed Jun 10, 2025
commit acc60827bf385efedb0afb0e9218c02460c9c892
2 changes: 1 addition & 1 deletion .github/scripts/create-bug-report-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function main(): Promise<void> {
process.exit(1);
}

const issueBody = `**What is this bug report issue for?**\n\n1. This issue is used to track release dates on this [Github Project board](https://github.com/orgs/MetaMask/projects/${projectNumber}/views/${projectViewNumber}), which content then gets pulled into our metrics system.\n\n2. This issue is also used by our Zapier automations, to determine if automated notifications shall be sent on Slack for release \`${releaseVersion}\`. Notifications will only be sent as long as this issue is open.\n\n**Who created and/or closed this issue?**\n\n- This issue was automatically created by a GitHub action upon the creation of the release branch \`Version-v${releaseVersion}\`, indicating the release was cut.\n\n- This issue gets automatically closed by another GitHub action, once the \`Version-v${releaseVersion}\` branch merges into \`main\`, indicating the release is prepared for store submission.`;
const issueBody = `**What is this bug report issue for?**\n\n1. This issue is used to track release dates on this [Github Project board](https://github.com/orgs/MetaMask/projects/${projectNumber}/views/${projectViewNumber}), which content then gets pulled into our metrics system.\n\n2. This issue is also used by our Zapier automations, to determine if automated notifications shall be sent on Slack for release \`${releaseVersion}\`. Notifications will only be sent as long as this issue is open.\n\n**Who created and/or closed this issue?**\n\n- This issue was automatically created by a GitHub action upon the creation of the release branch \`Version-v${releaseVersion}\`, indicating the release was cut.\n\n- This issue gets automatically closed by another GitHub action, once the release branch \`Version-v${releaseVersion}\` or \`release/v${releaseVersion}\` merges into \`main\`, indicating the release is prepared for store submission.`;
const issueId = await createIssue(octokit, repoOwner, planningRepoName, issueTitle, issueBody, [regressionLabelTestingId, typeBugLabelId, teamLabelId]);

// Retrieve project, in order to obtain its ID
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Check Attributions

on:
push:
branches: Version-v*
branches:
- Version-v*
- release/v*

jobs:
check-attributions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
close-bug-report:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'Version-v')
if: github.event.pull_request.merged == true && ( startsWith(github.event.pull_request.head.ref, 'Version-v') || startsWith(github.event.pull_request.head.ref, 'release/v') )
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: 'CodeQL'

on:
push:
branches: [main, Version-v*, cla-signatures, master, snaps]
branches: [main, Version-v*, cla-signatures, master, snaps, release/v*]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
- name: Extract version from branch name if release branch
id: extract_version
run: |
if [[ "$GITHUB_REF" =~ ^refs/heads/Version-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
version="${GITHUB_REF#refs/heads/Version-v}"
if [[ "$GITHUB_REF" =~ ^refs/heads/(Version-v|release/v)[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
version="${GITHUB_REF#refs/heads/}"
echo "New release branch($version), continue next steps"
echo "version=$version" >> "$GITHUB_OUTPUT"
else
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ on:
previous-version-tag:
description: 'Previous release version tag. eg: v7.7.0'
required: true
release-branch-naming:
description: 'The workflow to use, the current (Version-vX.Y.Z) or the new (release/vX.Y.Z)'
type: choice
required: true
options:
- Version-vX.Y.Z
- release/vX.Y.Z
jobs:
create-release-pr:
create-release-pr-old:
name: Create Release Pull Request (Version-vX.Y.Z)
if: ${{ inputs.release-branch-naming == 'Version-vX.Y.Z' }}
uses: MetaMask/github-tools/.github/workflows/create-release-pr.yml@d1ba843333b920fc9b0e1823fd519b7a64d07f5f
with:
platform: extension
Expand All @@ -27,3 +36,21 @@ jobs:
permissions:
contents: write
pull-requests: write

create-release-pr:
name: Create Release Pull Request using Github Tools release/vX.Y.Z
if: ${{ inputs.release-branch-naming == 'release/vX.Y.Z' }}
uses: MetaMask/github-tools/.github/workflows/create-release-pr.yml@ale/unify-create-release-mobile-extension # Update this!!
with:
platform: extension
base-branch: ${{ inputs.base-branch }}
semver-version: ${{ inputs.semver-version }}
previous-version-tag: ${{ inputs.previous-version-tag }}
github-tools-version: ale/unify-create-release-mobile-extension
secrets:
# This token needs write permissions to metamask-extension & read permissions to metamask-planning
github-token: ${{ secrets.PR_TOKEN }}
google-application-creds-base64: ${{ secrets.GCP_RLS_SHEET_ACCOUNT_BASE64 }}
permissions:
contents: write
pull-requests: write
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
- master
- Version-v*
- release/v*
- trigger-ci*
pull_request:
types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repository-health-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
run: ./development/shellcheck.sh

- name: Validate changelog
if: ${{ !startsWith(env.BRANCH, 'Version-v') }}
if: ${{ !startsWith(env.BRANCH, 'Version-v') && !startsWith(env.BRANCH, 'release/v') }}
run: yarn lint:changelog

- name: Validate release candidate changelog
if: ${{ startsWith(env.BRANCH, 'Version-v') }}
if: ${{ startsWith(env.BRANCH, 'Version-v') || startsWith(env.BRANCH, 'release/v') }}
run: .github/scripts/validate-changelog-in-rc.sh

- name: Lint lockfile
Expand Down
Loading