From a3821a9440d0f2c0f008f3ec01b9b47f5cc25f4a Mon Sep 17 00:00:00 2001 From: Sam Roberts <158088236+g-samroberts@users.noreply.github.com> Date: Wed, 25 Feb 2026 19:12:01 -0800 Subject: [PATCH] Update changelog workflow to reject nightly builds (#20248) --- .gemini/skills/docs-changelog/SKILL.md | 25 +++++++++++++++++++------ .github/workflows/release-notes.yml | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.gemini/skills/docs-changelog/SKILL.md b/.gemini/skills/docs-changelog/SKILL.md index d3a2f63623..f175260abd 100644 --- a/.gemini/skills/docs-changelog/SKILL.md +++ b/.gemini/skills/docs-changelog/SKILL.md @@ -59,6 +59,10 @@ To standardize the process of updating changelog files (`latest.md`, *Use this path if the version number ends in `.0`.* +**Important:** Based on the version, you must choose to follow either section +A.1 for stable releases or A.2 for preview releases. Do not follow the +instructions for the other section. + ### A.1: Stable Release (e.g., `v0.28.0`) For a stable release, you will generate two distinct summaries from the @@ -73,7 +77,8 @@ detailed **highlights** section for the release-specific page. use the existing announcements in `docs/changelogs/index.md` and the example within `.gemini/skills/docs-changelog/references/index_template.md` as your - guide. This format includes PR links and authors. + guide. This format includes PR links and authors. Stick to 1 or 2 PR + links and authors. - Add this new announcement to the top of `docs/changelogs/index.md`. 2. **Create Highlights and Update `latest.md`**: @@ -105,6 +110,10 @@ detailed **highlights** section for the release-specific page. *Use this path if the version number does **not** end in `.0`.* +**Important:** Based on the version, you must choose to follow either section +B.1 for stable patches or B.2 for preview patches. Do not follow the +instructions for the other section. + ### B.1: Stable Patch (e.g., `v0.28.1`) - **Target File**: `docs/changelogs/latest.md` @@ -113,10 +122,12 @@ detailed **highlights** section for the release-specific page. `# Latest stable release: {{version}}` 2. Update the rease date. The line should read, `Released: {{release_date_month_dd_yyyy}}` - 3. **Prepend** the processed "What's Changed" list from the temporary file + 3. Determine if a "What's Changed" section exists in the temporary file + If so, continue to step 4. Otherwise, skip to step 5. + 4. **Prepend** the processed "What's Changed" list from the temporary file to the existing "What's Changed" list in `latest.md`. Do not change or replace the existing list, **only add** to the beginning of it. - 4. In the "Full Changelog", edit **only** the end of the URL. Identify the + 5. In the "Full Changelog", edit **only** the end of the URL. Identify the last part of the URL that looks like `...{previous_version}` and update it to be `...{version}`. @@ -133,10 +144,12 @@ detailed **highlights** section for the release-specific page. `# Preview release: {{version}}` 2. Update the rease date. The line should read, `Released: {{release_date_month_dd_yyyy}}` - 3. **Prepend** the processed "What's Changed" list from the temporary file + 3. Determine if a "What's Changed" section exists in the temporary file + If so, continue to step 4. Otherwise, skip to step 5. + 4. **Prepend** the processed "What's Changed" list from the temporary file to the existing "What's Changed" list in `preview.md`. Do not change or replace the existing list, **only add** to the beginning of it. - 4. In the "Full Changelog", edit **only** the end of the URL. Identify the + 5. In the "Full Changelog", edit **only** the end of the URL. Identify the last part of the URL that looks like `...{previous_version}` and update it to be `...{version}`. @@ -149,5 +162,5 @@ detailed **highlights** section for the release-specific page. ## Finalize -- After making changes, run `npm run format` to ensure consistency. +- After making changes, run `npm run format` ONLY to ensure consistency. - Delete any temporary files created during the process. diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 08a3625822..8a681dadf6 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -56,7 +56,18 @@ jobs: GH_TOKEN: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}' BODY: '${{ github.event.inputs.body || github.event.release.body }}' + - name: 'Validate version' + id: 'validate_version' + run: | + if echo "${{ steps.release_info.outputs.VERSION }}" | grep -q "nightly"; then + echo "Nightly release detected. Stopping workflow." + echo "CONTINUE=false" >> "$GITHUB_OUTPUT" + else + echo "CONTINUE=true" >> "$GITHUB_OUTPUT" + fi + - name: 'Generate Changelog with Gemini' + if: "steps.validate_version.outputs.CONTINUE == 'true'" uses: 'google-github-actions/run-gemini-cli@a3bf79042542528e91937b3a3a6fbc4967ee3c31' # ratchet:google-github-actions/run-gemini-cli@v0 with: gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' @@ -70,7 +81,10 @@ jobs: Execute the release notes generation process using the information provided. + When you are done, please output your thought process and the steps you took for future debugging purposes. + - name: 'Create Pull Request' + if: "steps.validate_version.outputs.CONTINUE == 'true'" uses: 'peter-evans/create-pull-request@v6' with: token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'