Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: slack release testing #43

Merged
merged 30 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
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
19 changes: 16 additions & 3 deletions .github/scripts/create-platform-release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,18 @@ get_release_branch_name() {
local platform="$1" # Platform can be 'mobile' or 'extension'
local new_version="$2" # Semantic version, e.g., '12.9.2'

if platform == "mobile"; then
# Check if TEST_ONLY environment variable is set to "true"
# This is to run a development version of the release process without impacting downstream automation
if [ "$TEST_ONLY" == "true" ]; then
echo "release-testing/${new_version}"
return 0
fi

# Determine the release branch name based on platform
if [ "$platform" == "mobile" ]; then
RELEASE_BRANCH_NAME="release/${new_version}"
echo "${RELEASE_BRANCH_NAME}"
elif platform == "extension"; then
elif [ "$platform" == "extension" ]; then
RELEASE_BRANCH_NAME="Version-v${new_version}"
echo "${RELEASE_BRANCH_NAME}"
else
Expand All @@ -60,6 +68,7 @@ get_release_branch_name() {
}



RELEASE_BRANCH_NAME=$(get_release_branch_name $PLATFORM $NEW_VERSION)
CHANGELOG_BRANCH_NAME="chore/${NEW_VERSION}-Changelog"

Expand Down Expand Up @@ -149,19 +158,23 @@ npx @metamask/[email protected] update --rc --repo "${GITHUB_REPOSITORY_URL}"
# Need to run from .github-tools context to inherit it's dependencies/environment
echo "Current Directory: $(pwd)"
PROJECT_GIT_DIR=$(pwd)
ls -ltra
cd ./github-tools/
ls -ltra
corepack prepare [email protected] --activate
# This can't be done from the actions context layer due to the upstream repository having it's own context set with yarn
yarn --cwd install
echo "Generating test plan csv.."
yarn run gen:commits "${PLATFORM}" "${PREVIOUS_VERSION}" "${RELEASE_BRANCH_NAME}" "${PROJECT_GIT_DIR}"

echo "Updating release sheet.."
# Create a new Release Sheet Page for the new version with our commits.csv content
yarn run update-release-sheet "${PLATFORM}" "${NEW_VERSION}" "${GOOGLE_DOCUMENT_ID}" "./commits.csv" "${PROJECT_GIT_DIR}" "${MOBILE_TEMPLATE_SHEET_ID}" "${EXTENSION_TEMPLATE_SHEET_ID}"
cd ../

echo "Adding and committing changes.."
git add ./commits.csv


if ! (git commit -am "updated changelog and generated feature test plan");
then
echo "Error: No changes detected."
Expand Down
Loading