diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 58c8c4152d2..6065f84b868 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -43,14 +43,10 @@ jobs: cache: yarn - name: Install dependencies run: yarn --immutable - - name: Set Versions - id: set-versions - shell: bash - run: SEMVER_VERSION=${{ github.event.inputs.semver-version }} VERSION_NUMBER=${{ github.event.inputs.version-number }} yarn set-version - - name: Create Release PR - id: create-release-pr + - name: Create Release & Changelog PR + id: create-release-changelog-pr shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }} \ No newline at end of file + ./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }} ${{ github.event.inputs.version-number }} \ No newline at end of file diff --git a/scripts/create-release-pr.sh b/scripts/create-release-pr.sh index 543360ce7d8..7707cdc276b 100755 --- a/scripts/create-release-pr.sh +++ b/scripts/create-release-pr.sh @@ -6,6 +6,7 @@ set -o pipefail PREVIOUS_VERSION="${1}" NEW_VERSION="${2}" +NEW_VERSION_NUMBER="${3}" RELEASE_BRANCH_PREFIX="release/" if [[ -z $NEW_VERSION ]]; then @@ -15,30 +16,43 @@ fi RELEASE_BRANCH_NAME="${RELEASE_BRANCH_PREFIX}${NEW_VERSION}" CHANGELOG_BRANCH_NAME="chore/${NEW_VERSION}-Changelog" -RELEASE_BODY="This is the release candidate for version ${NEW_VERSION}. The changelog will be found in another PR ${CHANGELOG_BRANCH_NAME}." +RELEASE_BODY="This is the release candidate for version ${NEW_VERSION}. The changelog will be found in another PR ${CHANGELOG_BRANCH_NAME}. + + # Team sign-off checklist + - [] team-security + - [] team-platform + - [] team-snaps-platform + - [] team-sdk + - [] team-assets + - [] team-notifications + - [] team-confirmations + - [] team-design-system + - [] team-tiger + - [] team-wallet-framework + - [] team-stake + - [] team-accounts + + # Reference + - Testing plan sheet - https://docs.google.com/spreadsheets/d/1tsoodlAlyvEUpkkcNcbZ4PM9HuC9cEM80RZeoVv5OCQ/edit?gid=404070372#gid=404070372" git config user.name metamaskbot git config user.email metamaskbot@users.noreply.github.com -git checkout -b "${RELEASE_BRANCH_NAME}" - -if ! (git add . && git commit -m "${NEW_VERSION}"); -then - echo "Error: No changes detected." - exit 1 -fi - -git push --set-upstream origin "${RELEASE_BRANCH_NAME}" - gh pr create \ --draft \ --title "feat: ${NEW_VERSION}" \ --body "${RELEASE_BODY}" \ --head "${RELEASE_BRANCH_NAME}"; +echo "Release PR Created" +git checkout "${RELEASE_BRANCH_NAME}" +echo "Release Branch Checked Out" git checkout -b "${CHANGELOG_BRANCH_NAME}" +echo "Changelog Branch Created" +#Bump versions for the release" +SEMVER_VERSION="${NEW_VERSION}" VERSION_NUMBER="${NEW_VERSION_NUMBER}" yarn set-version #Generate changelog and test plan csv node ./scripts/generate-rc-commits.mjs "${PREVIOUS_VERSION}" "${RELEASE_BRANCH_NAME}"