-
Notifications
You must be signed in to change notification settings - Fork 960
fix(release): call the dev version bump instead of listening for an event that never fires #3129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,41 @@ concurrency: | |
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Move `dev` past the version that just published. | ||
| # | ||
| # This is a CALL, not a `release: published` listener. The release is created with | ||
| # `github.token`, and GitHub does not start workflow runs from events that token | ||
| # raises - so a listener cannot observe a release this repository publishes itself. In | ||
| # that form it ran ZERO times across v2.37.0, v2.38.0 and v2.39.0 while every one of | ||
| # those bumps was opened by hand (#3045, #3076, #3127). | ||
| # | ||
| # `needs: publish` means this is skipped unless the publish job succeeded, so a failed | ||
| # publish or a failed release creation never opens a bump pull request; the explicit | ||
| # condition only adds the dry-run case. The called workflow declares its own | ||
| # `contents: write` / `pull-requests: write` for its own job, so nothing here gains | ||
| # write access. | ||
| # | ||
| # Both channels call this, and the double-call is safe because `bump-dev-version.ts` | ||
| # compares against what `dev` already carries. In the usual train `dev` is already at | ||
| # the stable core when the preview publishes, so that call returns `changed=false` | ||
| # ("dev already carries 2.40.0, which is ahead of the published 2.40.0-preview.*") and | ||
| # every later step is gated on that output. The stable call returns `changed=true` and | ||
| # opens the one pull request. A preview publishing while `dev` is genuinely behind | ||
| # still bumps it, which is the point. | ||
| # | ||
| # It is declared FIRST in this file, ahead of the jobs it depends on, because | ||
| # tests/ci-workflows.test.ts splits the workflow on `- name:` and reads each `run:` | ||
| # block to the start of the next one when it checks that dispatch inputs never | ||
| # interpolate into shell source. A job declared between two steps lands inside that | ||
| # window and reads as shell. Job order in YAML carries no execution meaning - `needs` | ||
| # does - so declaring it before its own dependency costs nothing. | ||
| bump-dev-version: | ||
| needs: publish | ||
| if: ${{ inputs.dry-run != true }} | ||
| uses: ./.github/workflows/dev-version-bump.yml | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On every successful non-dry-run release, this call inherits the workflow-level AGENTS.md reference: .github/AGENTS.md:L16-L16 Useful? React with 👍 / 👎. |
||
| with: | ||
| released-version: v${{ inputs.version }} | ||
|
|
||
| validate-dispatch: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the caller's permissions are fixed, every bump that changes
devstill pushes the branch and creates its PR with the defaultgithub.token. GitHub suppresses workflow runs for events generated by that token—the same behavior motivating this change—so neither the branch push nor PR creation startsci.ymlorenforce-pr-target.yml; the automated PR will consequently lack its required checks until a human retriggers an event. Create it with an approved non-default credential or explicitly arrange a non-suppressed trigger for the required PR workflows.AGENTS.md reference: .github/AGENTS.md:L16-L18
Useful? React with 👍 / 👎.