diff --git a/.github/actions/create-pull-request/action.yml b/.github/actions/create-pull-request/action.yml index 4b562a6183a..0e3672191ee 100644 --- a/.github/actions/create-pull-request/action.yml +++ b/.github/actions/create-pull-request/action.yml @@ -43,13 +43,17 @@ runs: if: "inputs.dry-run == 'false'" env: GH_TOKEN: '${{ steps.generate_token.outputs.token }}' + INPUTS_PR_TITLE: ${{ inputs.pr-title }} + INPUTS_PR_BODY: ${{ inputs.pr-body }} + INPUTS_BASE_BRANCH: ${{ inputs.base-branch }} + INPUTS_BRANCH_NAME: ${{ inputs.branch-name }} shell: 'bash' run: | set -e PR_URL=$(gh pr create \ - --title "${{ inputs.pr-title }}" \ - --body "${{ inputs.pr-body }}" \ - --base "${{ inputs.base-branch }}" \ - --head "${{ inputs.branch-name }}" \ + --title "${INPUTS_PR_TITLE}" \ + --body "${INPUTS_PR_BODY}" \ + --base "${INPUTS_BASE_BRANCH}" \ + --head "${INPUTS_BRANCH_NAME}" \ --fill) gh pr merge "$PR_URL" --auto --squash diff --git a/.github/actions/publish-release/action.yml b/.github/actions/publish-release/action.yml index 14af62f8ae1..2731feff5f3 100644 --- a/.github/actions/publish-release/action.yml +++ b/.github/actions/publish-release/action.yml @@ -52,15 +52,19 @@ runs: id: 'release_branch' shell: 'bash' run: | - BRANCH_NAME="release/${{ inputs.release-tag }}" + BRANCH_NAME="release/${INPUTS_RELEASE_TAG}" git switch -c "${BRANCH_NAME}" echo "BRANCH_NAME=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}" + env: + INPUTS_RELEASE_TAG: ${{ inputs.release-tag }} - name: 'âŦ†ī¸ Update package versions' working-directory: '${{ inputs.working-directory }}' shell: 'bash' run: | - npm run release:version "${{ inputs.release-version }}" + npm run release:version "${INPUTS_RELEASE_VERSION}" + env: + INPUTS_RELEASE_VERSION: ${{ inputs.release-version }} - name: '💾 Commit and Conditionally Push package versions' working-directory: '${{ inputs.working-directory }}' @@ -103,32 +107,38 @@ runs: working-directory: '${{ inputs.working-directory }}' env: NODE_AUTH_TOKEN: '${{ inputs.wombat-token-core }}' + INPUTS_DRY_RUN: ${{ inputs.dry-run }} + INPUTS_NPM_TAG: ${{ inputs.npm-tag }} shell: 'bash' run: | npm publish \ - --dry-run="${{ inputs.dry-run }}" \ + --dry-run="${INPUTS_DRY_RUN}" \ --workspace="@google/gemini-cli-core" \ - --tag="${{ inputs.npm-tag }}" + --tag="${INPUTS_NPM_TAG}" - name: '🔗 Install latest core package' working-directory: '${{ inputs.working-directory }}' if: "${{ inputs.dry-run == 'false' }}" shell: 'bash' run: | - npm install "@google/gemini-cli-core@${{ inputs.release-version }}" \ + npm install "@google/gemini-cli-core@${INPUTS_RELEASE_VERSION}" \ --workspace="@google/gemini-cli" \ --save-exact + env: + INPUTS_RELEASE_VERSION: ${{ inputs.release-version }} - name: 'đŸ“Ļ Publish @google/gemini-cli' working-directory: '${{ inputs.working-directory }}' env: NODE_AUTH_TOKEN: '${{ inputs.wombat-token-cli }}' + INPUTS_DRY_RUN: ${{ inputs.dry-run }} + INPUTS_NPM_TAG: ${{ inputs.npm-tag }} shell: 'bash' run: | npm publish \ - --dry-run="${{ inputs.dry-run }}" \ + --dry-run="${INPUTS_DRY_RUN}" \ --workspace="@google/gemini-cli" \ - --tag="${{ inputs.npm-tag }}" + --tag="${INPUTS_NPM_TAG}" - name: '🎁 Bundle' working-directory: '${{ inputs.working-directory }}' @@ -141,11 +151,14 @@ runs: if: "${{ inputs.dry-run == 'false' }}" env: GITHUB_TOKEN: '${{ inputs.github-token }}' + INPUTS_RELEASE_TAG: ${{ inputs.release-tag }} + STEPS_RELEASE_BRANCH_OUTPUTS_BRANCH_NAME: ${{ steps.release_branch.outputs.BRANCH_NAME }} + INPUTS_PREVIOUS_TAG: ${{ inputs.previous-tag }} shell: 'bash' run: | - gh release create "${{ inputs.release-tag }}" \ + gh release create "${INPUTS_RELEASE_TAG}" \ bundle/gemini.js \ - --target "${{ steps.release_branch.outputs.BRANCH_NAME }}" \ - --title "Release ${{ inputs.release-tag }}" \ - --notes-start-tag "${{ inputs.previous-tag }}" \ + --target "${STEPS_RELEASE_BRANCH_OUTPUTS_BRANCH_NAME}" \ + --title "Release ${INPUTS_RELEASE_TAG}" \ + --notes-start-tag "${INPUTS_PREVIOUS_TAG}" \ --generate-notes diff --git a/.github/actions/push-docker/action.yml b/.github/actions/push-docker/action.yml index d59f4be7636..4ce5beed9e5 100644 --- a/.github/actions/push-docker/action.yml +++ b/.github/actions/push-docker/action.yml @@ -47,8 +47,10 @@ runs: id: 'branch_name' shell: 'bash' run: | - REF_NAME="${{ inputs.ref-name }}" + REF_NAME="${INPUTS_REF_NAME}" echo "name=${REF_NAME%/merge}" >> $GITHUB_OUTPUT + env: + INPUTS_REF_NAME: ${{ inputs.ref-name }} - name: 'Build and Push the Docker Image' uses: 'docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83' # ratchet:docker/build-push-action@v6 with: diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index 0b5647daca4..4637d7ecaa2 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -44,5 +44,5 @@ jobs: - name: 'Run evaluation' working-directory: '/app' run: | - poetry run exp_run --experiment-mode=on-demand --branch-or-commit=${{ github.ref_name }} --model-name=gemini-2.5-pro --dataset=swebench_verified --concurrency=15 + poetry run exp_run --experiment-mode=on-demand --branch-or-commit=${GITHUB_REF_NAME} --model-name=gemini-2.5-pro --dataset=swebench_verified --concurrency=15 poetry run python agent_prototypes/scripts/parse_gcli_logs_experiment.py --experiment_dir=experiments/adhoc/gcli_temp_exp --gcs-bucket="${EVAL_GCS_BUCKET}" --gcs-path=gh_action_artifacts diff --git a/.github/workflows/gemini-automated-issue-triage.yml b/.github/workflows/gemini-automated-issue-triage.yml index b979e7e9497..926fe402027 100644 --- a/.github/workflows/gemini-automated-issue-triage.yml +++ b/.github/workflows/gemini-automated-issue-triage.yml @@ -71,8 +71,10 @@ jobs: if: |- github.event_name == 'workflow_dispatch' && !contains(steps.get_issue_data.outputs.labels, 'status/need-triage') run: | - echo "Issue #${{ github.event.inputs.issue_number }} does not have the 'status/need-triage' label. Stopping workflow." + echo "Issue #${GITHUB_EVENT_INPUTS_ISSUE_NUMBER} does not have the 'status/need-triage' label. Stopping workflow." exit 1 + env: + GITHUB_EVENT_INPUTS_ISSUE_NUMBER: ${{ github.event.inputs.issue_number }} - name: 'Checkout' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 diff --git a/.github/workflows/release-change-tags.yml b/.github/workflows/release-change-tags.yml index b594d99d173..7efde25402e 100644 --- a/.github/workflows/release-change-tags.yml +++ b/.github/workflows/release-change-tags.yml @@ -39,17 +39,24 @@ jobs: if: 'github.event.inputs.dry_run == false' env: NODE_AUTH_TOKEN: '${{ secrets.WOMBAT_TOKEN_CORE }}' + GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }} + GITHUB_EVENT_INPUTS_CHANNEL: ${{ github.event.inputs.channel }} run: | - npm dist-tag add @google/gemini-cli-core@${{ github.event.inputs.version }} ${{ github.event.inputs.channel }} + npm dist-tag add @google/gemini-cli-core@${GITHUB_EVENT_INPUTS_VERSION} ${GITHUB_EVENT_INPUTS_CHANNEL} - name: 'Change tag for @google/gemini-cli' if: 'github.event.inputs.dry_run == false' env: NODE_AUTH_TOKEN: '${{ secrets.WOMBAT_TOKEN_CLI }}' + GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }} + GITHUB_EVENT_INPUTS_CHANNEL: ${{ github.event.inputs.channel }} run: | - npm dist-tag add @google/gemini-cli@${{ github.event.inputs.version }} ${{ github.event.inputs.channel }} + npm dist-tag add @google/gemini-cli@${GITHUB_EVENT_INPUTS_VERSION} ${GITHUB_EVENT_INPUTS_CHANNEL} - name: 'Log dry run' if: 'github.event.inputs.dry_run == true' run: | - echo "Dry run: Would have added tag '${{ github.event.inputs.channel }}' to version '${{ github.event.inputs.version }}' for @google/gemini-cli and @google/gemini-cli-core." + echo "Dry run: Would have added tag '${GITHUB_EVENT_INPUTS_CHANNEL}' to version '${GITHUB_EVENT_INPUTS_VERSION}' for @google/gemini-cli and @google/gemini-cli-core." + env: + GITHUB_EVENT_INPUTS_CHANNEL: ${{ github.event.inputs.channel }} + GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }} diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml index b0abd5012c1..45f3003acf1 100644 --- a/.github/workflows/release-manual.yml +++ b/.github/workflows/release-manual.yml @@ -56,9 +56,11 @@ jobs: - name: 'Prepare Release Info' id: 'release_info' run: | - RELEASE_VERSION="${{ github.event.inputs.version }}" + RELEASE_VERSION="${GITHUB_EVENT_INPUTS_VERSION}" echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> "${GITHUB_OUTPUT}" echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0)" >> "${GITHUB_OUTPUT}" + env: + GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }} - name: 'Run Tests' if: |- diff --git a/.github/workflows/release-patch-1-create-pr.yml b/.github/workflows/release-patch-1-create-pr.yml index 71c324cbbc9..2ac5991da9a 100644 --- a/.github/workflows/release-patch-1-create-pr.yml +++ b/.github/workflows/release-patch-1-create-pr.yml @@ -70,9 +70,11 @@ jobs: if: "github.event.inputs.channel == 'stable'" env: GH_TOKEN: '${{ steps.generate_token.outputs.token }}' + GITHUB_EVENT_INPUTS_COMMIT: ${{ github.event.inputs.commit }} + GITHUB_EVENT_INPUTS_DRY_RUN: ${{ github.event.inputs.dry_run }} continue-on-error: true run: | - node scripts/create-patch-pr.js --commit=${{ github.event.inputs.commit }} --channel=stable --dry-run=${{ github.event.inputs.dry_run }} > patch_output.log 2>&1 + node scripts/create-patch-pr.js --commit=${GITHUB_EVENT_INPUTS_COMMIT} --channel=stable --dry-run=${GITHUB_EVENT_INPUTS_DRY_RUN} > patch_output.log 2>&1 echo "EXIT_CODE=$?" >> "$GITHUB_OUTPUT" cat patch_output.log @@ -81,9 +83,12 @@ jobs: if: "github.event.inputs.channel != 'stable'" env: GH_TOKEN: '${{ steps.generate_token.outputs.token }}' + GITHUB_EVENT_INPUTS_COMMIT: ${{ github.event.inputs.commit }} + GITHUB_EVENT_INPUTS_CHANNEL: ${{ github.event.inputs.channel }} + GITHUB_EVENT_INPUTS_DRY_RUN: ${{ github.event.inputs.dry_run }} continue-on-error: true run: | - node scripts/create-patch-pr.js --commit=${{ github.event.inputs.commit }} --channel=${{ github.event.inputs.channel }} --dry-run=${{ github.event.inputs.dry_run }} > patch_output.log 2>&1 + node scripts/create-patch-pr.js --commit=${GITHUB_EVENT_INPUTS_COMMIT} --channel=${GITHUB_EVENT_INPUTS_CHANNEL} --dry-run=${GITHUB_EVENT_INPUTS_DRY_RUN} > patch_output.log 2>&1 echo "EXIT_CODE=$?" >> "$GITHUB_OUTPUT" cat patch_output.log @@ -91,12 +96,16 @@ jobs: if: '!inputs.dry_run && inputs.original_pr' env: GH_TOKEN: '${{ steps.generate_token.outputs.token }}' + GITHUB_EVENT_INPUTS_CHANNEL: ${{ github.event.inputs.channel }} + STEPS_CREATE_PATCH_STABLE_OUTPUTS_EXIT_CODE: ${{ steps.create_patch_stable.outputs.EXIT_CODE }} + STEPS_CREATE_PATCH_PREVIEW_OUTPUTS_EXIT_CODE: ${{ steps.create_patch_preview.outputs.EXIT_CODE }} + GITHUB_EVENT_INPUTS_ORIGINAL_PR: ${{ github.event.inputs.original_pr }} run: | # Determine which step ran based on channel - if [ "${{ github.event.inputs.channel }}" = "stable" ]; then - EXIT_CODE="${{ steps.create_patch_stable.outputs.EXIT_CODE }}" + if [ "${GITHUB_EVENT_INPUTS_CHANNEL}" = "stable" ]; then + EXIT_CODE="${STEPS_CREATE_PATCH_STABLE_OUTPUTS_EXIT_CODE}" else - EXIT_CODE="${{ steps.create_patch_preview.outputs.EXIT_CODE }}" + EXIT_CODE="${STEPS_CREATE_PATCH_PREVIEW_OUTPUTS_EXIT_CODE}" fi # Check if patch output exists and contains branch info @@ -105,12 +114,12 @@ jobs: # Branch exists with existing PR PR_NUMBER=$(grep "Found existing PR" patch_output.log | sed 's/.*Found existing PR #\([0-9]*\).*/\1/') PR_URL=$(grep "Found existing PR" patch_output.log | sed 's/.*Found existing PR #[0-9]*: \(.*\)/\1/') - gh pr comment ${{ github.event.inputs.original_pr }} --body "â„šī¸ Patch PR already exists! A patch PR for this change already exists: [#$PR_NUMBER]($PR_URL). Please review and approve this existing patch PR. If it's incorrect, close it and run the patch command again." + gh pr comment ${GITHUB_EVENT_INPUTS_ORIGINAL_PR} --body "â„šī¸ Patch PR already exists! A patch PR for this change already exists: [#$PR_NUMBER]($PR_URL). Please review and approve this existing patch PR. If it's incorrect, close it and run the patch command again." elif grep -q "exists but has no open PR" patch_output.log; then # Branch exists but no PR BRANCH=$(grep "Hotfix branch" patch_output.log | grep "already exists" | sed 's/.*Hotfix branch \(.*\) already exists.*/\1/') - gh pr comment ${{ github.event.inputs.original_pr }} --body "â„šī¸ Patch branch exists but no PR found! A patch branch [\`$BRANCH\`](https://github.com/${{ github.repository }}/tree/$BRANCH) exists but has no open PR. This might indicate an incomplete patch process. Please delete the branch and run the patch command again." + gh pr comment ${GITHUB_EVENT_INPUTS_ORIGINAL_PR} --body "â„šī¸ Patch branch exists but no PR found! A patch branch [\`$BRANCH\`](https://github.com/${{ github.repository }}/tree/$BRANCH) exists but has no open PR. This might indicate an incomplete patch process. Please delete the branch and run the patch command again." elif [ "$EXIT_CODE" = "0" ]; then # Success - find the newly created PR @@ -122,15 +131,15 @@ jobs: if [ -n "$PR_INFO" ]; then PR_NUMBER=$(echo "$PR_INFO" | jq -r '.number') PR_URL=$(echo "$PR_INFO" | jq -r '.url') - gh pr comment ${{ github.event.inputs.original_pr }} --body "🚀 Patch PR created! The patch release PR has been created: [#$PR_NUMBER]($PR_URL). Please review and approve this PR to complete the patch release." + gh pr comment ${GITHUB_EVENT_INPUTS_ORIGINAL_PR} --body "🚀 Patch PR created! The patch release PR has been created: [#$PR_NUMBER]($PR_URL). Please review and approve this PR to complete the patch release." else # Fallback if we can't find the specific PR - gh pr comment ${{ github.event.inputs.original_pr }} --body "🚀 Patch PR created! The patch release PR for this change has been created. Please review and approve it: [View all patch PRs](https://github.com/${{ github.repository }}/pulls?q=is%3Apr+is%3Aopen+label%3Apatch)" + gh pr comment ${GITHUB_EVENT_INPUTS_ORIGINAL_PR} --body "🚀 Patch PR created! The patch release PR for this change has been created. Please review and approve it: [View all patch PRs](https://github.com/${{ github.repository }}/pulls?q=is%3Apr+is%3Aopen+label%3Apatch)" fi else # Other error - gh pr comment ${{ github.event.inputs.original_pr }} --body "❌ Patch creation failed! There was an error creating the patch. Please check the workflow logs for details: [View workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" + gh pr comment ${GITHUB_EVENT_INPUTS_ORIGINAL_PR} --body "❌ Patch creation failed! There was an error creating the patch. Please check the workflow logs for details: [View workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" fi else - gh pr comment ${{ github.event.inputs.original_pr }} --body "❌ Patch creation failed! No output was generated. Please check the workflow logs: [View workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" + gh pr comment ${GITHUB_EVENT_INPUTS_ORIGINAL_PR} --body "❌ Patch creation failed! No output was generated. Please check the workflow logs: [View workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" fi diff --git a/.github/workflows/release-patch-3-release.yml b/.github/workflows/release-patch-3-release.yml index 0e9bf6e56ff..ac0c204f4f6 100644 --- a/.github/workflows/release-patch-3-release.yml +++ b/.github/workflows/release-patch-3-release.yml @@ -66,10 +66,11 @@ jobs: id: 'patch_version' env: GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_EVENT_INPUTS_TYPE: ${{ github.event.inputs.type }} run: | # Use the existing get-release-version.js script to calculate patch version # Run from main checkout which has full git history and access to npm - PATCH_JSON=$(node scripts/get-release-version.js --type=patch --patch-from=${{ github.event.inputs.type }}) + PATCH_JSON=$(node scripts/get-release-version.js --type=patch --patch-from=${GITHUB_EVENT_INPUTS_TYPE}) echo "Patch version calculation result: ${PATCH_JSON}" RELEASE_VERSION=$(echo "${PATCH_JSON}" | jq -r .releaseVersion) @@ -85,10 +86,15 @@ jobs: - name: 'Print Calculated Version' run: |- echo "Patch Release Summary:" - echo " Release Version: ${{ steps.patch_version.outputs.RELEASE_VERSION }}" - echo " Release Tag: ${{ steps.patch_version.outputs.RELEASE_TAG }}" - echo " NPM Tag: ${{ steps.patch_version.outputs.NPM_TAG }}" - echo " Previous Tag: ${{ steps.patch_version.outputs.PREVIOUS_TAG }}" + echo " Release Version: ${STEPS_PATCH_VERSION_OUTPUTS_RELEASE_VERSION}" + echo " Release Tag: ${STEPS_PATCH_VERSION_OUTPUTS_RELEASE_TAG}" + echo " NPM Tag: ${STEPS_PATCH_VERSION_OUTPUTS_NPM_TAG}" + echo " Previous Tag: ${STEPS_PATCH_VERSION_OUTPUTS_PREVIOUS_TAG}" + env: + STEPS_PATCH_VERSION_OUTPUTS_RELEASE_VERSION: ${{ steps.patch_version.outputs.RELEASE_VERSION }} + STEPS_PATCH_VERSION_OUTPUTS_RELEASE_TAG: ${{ steps.patch_version.outputs.RELEASE_TAG }} + STEPS_PATCH_VERSION_OUTPUTS_NPM_TAG: ${{ steps.patch_version.outputs.NPM_TAG }} + STEPS_PATCH_VERSION_OUTPUTS_PREVIOUS_TAG: ${{ steps.patch_version.outputs.PREVIOUS_TAG }} - name: 'Run Tests' uses: './.github/actions/run-tests' diff --git a/.github/workflows/release-promote.yml b/.github/workflows/release-promote.yml index ef8e3f680f7..0a071a9534c 100644 --- a/.github/workflows/release-promote.yml +++ b/.github/workflows/release-promote.yml @@ -66,6 +66,7 @@ jobs: id: 'versions' env: GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_EVENT_INPUTS_REF: ${{ github.event.inputs.ref }} run: | set -e STABLE_JSON=$(node scripts/get-release-version.js --type=stable ${{ github.event.inputs.stable_version_override && format('--stable_version_override={0}', github.event.inputs.stable_version_override) || '' }}) @@ -83,7 +84,7 @@ jobs: echo "PREVIOUS_STABLE_TAG=$(echo "${STABLE_JSON}" | jq -r .previousReleaseTag)" >> "${GITHUB_OUTPUT}" echo "PREVIEW_VERSION=$(echo "${PREVIEW_JSON}" | jq -r .releaseVersion)" >> "${GITHUB_OUTPUT}" # shellcheck disable=SC1083 - echo "PREVIEW_SHA=$(git rev-parse '${{ github.event.inputs.ref }}'^{commit})" >> "${GITHUB_OUTPUT}" + echo "PREVIEW_SHA=$(git rev-parse '${GITHUB_EVENT_INPUTS_REF}'^{commit})" >> "${GITHUB_OUTPUT}" echo "PREVIOUS_PREVIEW_TAG=$(echo "${PREVIEW_JSON}" | jq -r .previousReleaseTag)" >> "${GITHUB_OUTPUT}" echo "NEXT_NIGHTLY_VERSION=$(echo "${NIGHTLY_JSON}" | jq -r .releaseVersion)" >> "${GITHUB_OUTPUT}" echo "PREVIOUS_NIGHTLY_TAG=$(echo "${NIGHTLY_JSON}" | jq -r .previousReleaseTag)" >> "${GITHUB_OUTPUT}" @@ -94,14 +95,25 @@ jobs: - name: 'Display Pending Updates' run: | echo "Pending Changes, Next Versions:" - echo " Nightly: ${{ steps.versions.outputs.NEXT_NIGHTLY_VERSION }}" - echo " Preview: ${{ steps.versions.outputs.PREVIEW_VERSION }}" - echo " Stable: ${{ steps.versions.outputs.STABLE_VERSION }}" + echo " Nightly: ${STEPS_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION}" + echo " Preview: ${STEPS_VERSIONS_OUTPUTS_PREVIEW_VERSION}" + echo " Stable: ${STEPS_VERSIONS_OUTPUTS_STABLE_VERSION}" echo "" echo "Relevant SHAs:" - echo " Stable: Will be cut from: : ${{ steps.versions.outputs.STABLE_SHA }} / ${{ steps.versions.outputs.PREVIOUS_STABLE_TAG }}" - echo " Preview will be cut from: : ${{ steps.versions.outputs.PREVIEW_SHA }} (${{ github.event.inputs.ref }})". Users last saw preview as: ${{ steps.versions.outputs.PREVIOUS_PREVIEW_TAG }} - echo " Nightly will be udpated in : ${{ steps.versions.outputs.NEXT_SHA }} (${{ github.event.inputs.ref }}). Previous nightly tag: ${{ steps.versions.outputs.PREVIOUS_NIGHTLY_TAG }}" + echo " Stable: Will be cut from: : ${STEPS_VERSIONS_OUTPUTS_STABLE_SHA} / ${STEPS_VERSIONS_OUTPUTS_PREVIOUS_STABLE_TAG}" + echo " Preview will be cut from: : ${STEPS_VERSIONS_OUTPUTS_PREVIEW_SHA} (${GITHUB_EVENT_INPUTS_REF})". Users last saw preview as: ${STEPS_VERSIONS_OUTPUTS_PREVIOUS_PREVIEW_TAG} + echo " Nightly will be udpated in : ${STEPS_VERSIONS_OUTPUTS_NEXT_SHA} (${GITHUB_EVENT_INPUTS_REF}). Previous nightly tag: ${STEPS_VERSIONS_OUTPUTS_PREVIOUS_NIGHTLY_TAG}" + env: + STEPS_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION: ${{ steps.versions.outputs.NEXT_NIGHTLY_VERSION }} + STEPS_VERSIONS_OUTPUTS_PREVIEW_VERSION: ${{ steps.versions.outputs.PREVIEW_VERSION }} + STEPS_VERSIONS_OUTPUTS_STABLE_VERSION: ${{ steps.versions.outputs.STABLE_VERSION }} + STEPS_VERSIONS_OUTPUTS_STABLE_SHA: ${{ steps.versions.outputs.STABLE_SHA }} + STEPS_VERSIONS_OUTPUTS_PREVIOUS_STABLE_TAG: ${{ steps.versions.outputs.PREVIOUS_STABLE_TAG }} + STEPS_VERSIONS_OUTPUTS_PREVIEW_SHA: ${{ steps.versions.outputs.PREVIEW_SHA }} + GITHUB_EVENT_INPUTS_REF: ${{ github.event.inputs.ref }} + STEPS_VERSIONS_OUTPUTS_PREVIOUS_PREVIEW_TAG: ${{ steps.versions.outputs.PREVIOUS_PREVIEW_TAG }} + STEPS_VERSIONS_OUTPUTS_NEXT_SHA: ${{ steps.versions.outputs.NEXT_SHA }} + STEPS_VERSIONS_OUTPUTS_PREVIOUS_NIGHTLY_TAG: ${{ steps.versions.outputs.PREVIOUS_NIGHTLY_TAG }} test: name: 'Test ${{ matrix.channel }}' @@ -290,17 +302,22 @@ jobs: - name: 'Create and switch to a new branch' id: 'release_branch' run: | - BRANCH_NAME="chore/nightly-version-bump-${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }}" + BRANCH_NAME="chore/nightly-version-bump-${NEEDS_CALCULATE_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION}" git switch -c "${BRANCH_NAME}" echo "BRANCH_NAME=${BRANCH_NAME}" >> "${GITHUB_OUTPUT}" + env: + NEEDS_CALCULATE_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION: ${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }} - name: 'Update package versions' - run: 'npm run release:version "${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }}"' + run: 'npm run release:version "${NEEDS_CALCULATE_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION}"' + env: + NEEDS_CALCULATE_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION: ${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }} - name: 'Commit and Push package versions' env: BRANCH_NAME: '${{ steps.release_branch.outputs.BRANCH_NAME }}' DRY_RUN: '${{ github.event.inputs.dry_run }}' + NEEDS_CALCULATE_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION: ${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }} run: |- git add package.json packages/*/package.json if [ -f npm-shrinkwrap.json ]; then @@ -309,7 +326,7 @@ jobs: if [ -f package-lock.json ]; then git add package-lock.json fi - git commit -m "chore(release): bump version to ${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }}" + git commit -m "chore(release): bump version to ${NEEDS_CALCULATE_VERSIONS_OUTPUTS_NEXT_NIGHTLY_VERSION}" if [[ "${DRY_RUN}" == "false" ]]; then echo "Pushing release branch to remote..." git push --set-upstream origin "${BRANCH_NAME}"