From aa46eb4fd7b718897091ff910ff89c0d78c43b08 Mon Sep 17 00:00:00 2001 From: Richie Foreman Date: Sat, 18 Oct 2025 16:18:12 -0400 Subject: [PATCH] feat(release): Support dev/prod for release patch 1 (#11404) --- .../workflows/release-patch-0-from-comment.yml | 1 + .../workflows/release-patch-1-create-pr.yml | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-patch-0-from-comment.yml b/.github/workflows/release-patch-0-from-comment.yml index d7ea3b6f07..e85c2185d5 100644 --- a/.github/workflows/release-patch-0-from-comment.yml +++ b/.github/workflows/release-patch-0-from-comment.yml @@ -90,6 +90,7 @@ jobs: commit: '${{ steps.pr_status.outputs.MERGE_COMMIT_SHA }}', channel: channel, original_pr: '${{ github.event.issue.number }}' + environment: 'prod' } }); diff --git a/.github/workflows/release-patch-1-create-pr.yml b/.github/workflows/release-patch-1-create-pr.yml index 9f67e11f33..da6060b7d6 100644 --- a/.github/workflows/release-patch-1-create-pr.yml +++ b/.github/workflows/release-patch-1-create-pr.yml @@ -28,10 +28,19 @@ on: description: 'The original PR number to comment back on.' required: false type: 'string' + environment: + description: 'Environment' + required: false + type: 'choice' + options: + - 'prod' + - 'dev' + default: 'prod' jobs: create-patch: runs-on: 'ubuntu-latest' + environment: '${{ github.event.inputs.environment }}' permissions: contents: 'write' pull-requests: 'write' @@ -49,8 +58,13 @@ jobs: node-version-file: '.nvmrc' cache: 'npm' + - name: 'configure .npmrc' + uses: './.github/actions/setup-npmrc' + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Install Script Dependencies' - run: 'npm install yargs' + run: 'npm install yargs --no-package-lock' - name: 'Configure Git User' run: |- @@ -68,7 +82,7 @@ jobs: run: | # Capture output and display it in logs using tee { - node scripts/releasing/create-patch-pr.js --commit=${{ github.event.inputs.commit }} --channel=${{ github.event.inputs.channel }} --pullRequestNumber=${{ github.event.inputs.original_pr }} --dry-run=${{ github.event.inputs.dry_run }} + node scripts/releasing/create-patch-pr.js --cli-package-name="${{ vars.CLI_PACKAGE_NAME }}" --commit=${{ github.event.inputs.commit }} --channel=${{ github.event.inputs.channel }} --pullRequestNumber=${{ github.event.inputs.original_pr }} --dry-run=${{ github.event.inputs.dry_run }} echo "EXIT_CODE=$?" >> "$GITHUB_OUTPUT" } 2>&1 | tee >( echo "LOG_CONTENT<> "$GITHUB_ENV"