fbc18a386b
* ci: batch stable releases into one daily version The stable release PR was auto-merged the instant it went green, so a day with N bugfixes produced N patch releases (3.45.8 AND 3.45.9 on 2026-07-29 alone) — N upgrade notifications for stable users and N full Docker build cycles. Fixes now accumulate in release-please's rolling release PR and are cut as ONE version per day by release-stable-daily.yml (18:00 UTC). Approval/merge mechanics are unchanged from the inline step (#719): approve as github-actions[bot], auto-merge as the PAT so the merge triggers the tag-cutting run. - Urgent fix? workflow_dispatch the daily job or merge the release PR by hand — the schedule is a default, not a gate. - Beta is untouched: instant beta releases are load-bearing for same-day reporter verification. - schedule only fires from the default branch; the stable copy of the new workflow is inert and exists to keep branches in sync. * ci: harden the daily stable-release cut (review round) - P1: the daily job runs on a schedule, so a fork PR can spoof the head branch name 'release-please--branches--stable' — gh --head matches the name only. Pin --base stable AND require isCrossRepository == false so a fork PR can never be approved+auto-merged with the release PAT. - P2: this scheduled job is now the ONLY automatic stable cut, so the auto-merge-enable step no longer swallows failures (|| true); it fails loudly and verifies autoMergeRequest is actually set. A silently expired PAT would otherwise stop releases while the workflow stays green. Approve stays tolerant (re-approval can return non-zero). * ci: accept an immediately-merged release PR as success (review round 2) gh pr merge --auto merges immediately when required checks are already green — the normal 18:00 case, since fixes land hours earlier and CI passes. The autoMergeRequest verify then saw null on a MERGED PR and failed the job on the happy path. Now: MERGED = success, pending auto-merge = success, still-open-with-no-auto-merge = real failure. * ci: read release-PR state + auto-merge in one snapshot (review round 3) Two separate gh pr view calls raced: a pending auto-merge completing between them made the first read OPEN and the second read null on the now-merged PR, failing the job on a successful release. Fetch state and autoMergeRequest together. --------- Co-authored-by: Paul Nothaft <paul@MacStudio-von-Paul.local>
60 lines
2.5 KiB
YAML
60 lines
2.5 KiB
YAML
name: Release Please
|
|
|
|
on:
|
|
push:
|
|
branches: [stable]
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
release_created: ${{ steps.release.outputs.release_created }}
|
|
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
|
|
steps:
|
|
- name: Run Release Please
|
|
uses: googleapis/release-please-action@v4
|
|
id: release
|
|
with:
|
|
# Dedicated token so the release PR runs CI + can auto-merge without a
|
|
# manual review. Falls back to GITHUB_TOKEN before the secret is set (#719).
|
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
|
|
config-file: release-please-config.json
|
|
manifest-file: .release-please-manifest.json
|
|
target-branch: stable
|
|
|
|
# NOTE: stable release PRs are intentionally NOT auto-merged here
|
|
# anymore. Fixes accumulate in the rolling release PR and are cut as
|
|
# ONE patch version per day by release-stable-daily.yml (18:00 UTC,
|
|
# or on demand via workflow_dispatch / a manual merge of the release
|
|
# PR). Beta keeps instant releases — see release-please-beta.yml —
|
|
# because same-day reporter verification depends on it.
|
|
|
|
- name: Output Release Info
|
|
if: ${{ steps.release.outputs.release_created }}
|
|
run: |
|
|
echo "## Release Created! " >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "**Tag:** ${{ steps.release.outputs.tag_name }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "**Version:** ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "Docker images will be built and tagged with this version." >> $GITHUB_STEP_SUMMARY
|
|
|
|
# Best-effort "What's New" highlights on the freshly-created release. Runs in
|
|
# this same workflow run (not a `release:` trigger) because release-please
|
|
# creates the release with GITHUB_TOKEN, which never starts new workflow runs.
|
|
whatsnew:
|
|
needs: release-please
|
|
if: ${{ needs.release-please.outputs.release_created }}
|
|
permissions:
|
|
contents: write # edit the release body
|
|
models: read # GitHub Models (free tier)
|
|
uses: ./.github/workflows/whatsnew-highlights.yml
|
|
with:
|
|
tag: ${{ needs.release-please.outputs.tag_name }}
|
|
|