Update changelog workflow to reject nightly builds (#20248)

This commit is contained in:
Sam Roberts
2026-02-25 19:12:01 -08:00
committed by GitHub
parent 0bf3a015e8
commit a3821a9440
2 changed files with 33 additions and 6 deletions

View File

@@ -59,6 +59,10 @@ To standardize the process of updating changelog files (`latest.md`,
*Use this path if the version number ends in `.0`.* *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`) ### A.1: Stable Release (e.g., `v0.28.0`)
For a stable release, you will generate two distinct summaries from the 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 use the existing announcements in `docs/changelogs/index.md` and the
example within example within
`.gemini/skills/docs-changelog/references/index_template.md` as your `.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`. - Add this new announcement to the top of `docs/changelogs/index.md`.
2. **Create Highlights and Update `latest.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`.* *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`) ### B.1: Stable Patch (e.g., `v0.28.1`)
- **Target File**: `docs/changelogs/latest.md` - **Target File**: `docs/changelogs/latest.md`
@@ -113,10 +122,12 @@ detailed **highlights** section for the release-specific page.
`# Latest stable release: {{version}}` `# Latest stable release: {{version}}`
2. Update the rease date. The line should read, 2. Update the rease date. The line should read,
`Released: {{release_date_month_dd_yyyy}}` `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 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. 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 last part of the URL that looks like `...{previous_version}` and update
it to be `...{version}`. it to be `...{version}`.
@@ -133,10 +144,12 @@ detailed **highlights** section for the release-specific page.
`# Preview release: {{version}}` `# Preview release: {{version}}`
2. Update the rease date. The line should read, 2. Update the rease date. The line should read,
`Released: {{release_date_month_dd_yyyy}}` `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 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. 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 last part of the URL that looks like `...{previous_version}` and update
it to be `...{version}`. it to be `...{version}`.
@@ -149,5 +162,5 @@ detailed **highlights** section for the release-specific page.
## Finalize ## 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. - Delete any temporary files created during the process.

View File

@@ -56,7 +56,18 @@ jobs:
GH_TOKEN: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}' GH_TOKEN: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
BODY: '${{ github.event.inputs.body || github.event.release.body }}' 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' - 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 uses: 'google-github-actions/run-gemini-cli@a3bf79042542528e91937b3a3a6fbc4967ee3c31' # ratchet:google-github-actions/run-gemini-cli@v0
with: with:
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
@@ -70,7 +81,10 @@ jobs:
Execute the release notes generation process using the information provided. 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' - name: 'Create Pull Request'
if: "steps.validate_version.outputs.CONTINUE == 'true'"
uses: 'peter-evans/create-pull-request@v6' uses: 'peter-evans/create-pull-request@v6'
with: with:
token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}' token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'