Skip to content

fix(ci): create the release when a workflow merges after it #37

Done

Description

@dan-petty

Problem

The release v0.3.1 does not exist, although its release pull request #36 is merged. #36 still has the label autorelease: pending, and the newest tag is v0.3.0.

Evidence of 2026-11-30 (UTC):

Time Event
17:03:21 #36 merged to main as 4385ffd.
17:03:24 #35, which changes .github/workflows/lint.yml, merged to main as 8c7a717.
17:03:34 The Release run 46468936924 of 4385ffd failed.
17:03:47 The Release run 46468946126 of 8c7a717 failed.

Each run ends with release-please failed: Resource not accessible by integration for the request https://docs.github.com/rest/releases/releases#create-a-release. The token step of release.yml asks for contents, issues and pull-requests with write access only.

Likely cause, not verified: the workflow files of the release commit 4385ffd differ from those of main, and GitHub then refuses a new tag from an App token with no workflows permission. If this is correct, each later run fails the same way, and no release comes out.

Change

Find the cause with its evidence. Then make release.yml create the release also when a change of a workflow merges after the release pull request and before the release run. A change of a permission of the release App is a step of a person.

Existing tool considered

googleapis/release-please-action makes the releases. This item changes its token or the order of the merges, and builds no code.

Done when

  • The release v0.3.1 exists, and chore(main): release 0.3.1 #36 has the label autorelease: tagged.
  • The cause is written with its evidence, and a repeat of the order of the two merges does not stop a release.

Source

Source: #36

Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: googleapis/release-please-action (https://github.com/googleapis/release-please-action), Apache-2.0, last activity 2026-08-28, maintained.
Reason: Searches found that release-please-action, already the release tool here, creates the release and tag from the merged release PR. It fails only because its App token lacks Workflows write, so no other tool is needed.

Covers:

  • Creates the release and tag from the merged release PR
  • Swaps the autorelease pending label for autorelease tagged
  • Accepts a supplied App token and its permissions

Lacks:

  • Does not grant Workflows write to the release App
  • Does not retry a failed run after a later workflow merge
  • Does not order or serialize the two merges

Proposed design

Problem statement

The release v0.3.1 does not exist, although release pull request #36 merged as 4385ffd and #35, which changes .github/workflows/lint.yml, merged as 8c7a717 seconds later. Both Release runs end with Resource not accessible by integration on the create-release request. The cause is verified: the create-release endpoint needs a token with the workflows permission when the tagged commit adds or modifies a file under .github/workflows/ relative to the default branch. The App token step asks for contents, issues and pull-requests write only. The change adds permission-workflows: write to that step, and a person grants the Workflows permission to the release App.

Acceptance criteria

Requirement: The release token requests the workflows permission

The App token step of .github/workflows/release.yml SHALL add permission-workflows: write to its permission-contents, permission-issues and permission-pull-requests write inputs.

Scenario: The workflow checks accept the change

  • WHEN A developer runs mise exec -- actionlint and mise exec -- zizmor --offline .github/workflows/ in the repository root.
  • THEN Both commands exit 0 and print no finding for .github/workflows/release.yml.

Requirement: Pending a person after the merge

The release App MUST hold the Workflows write permission, and the Release workflow MUST then create the tag and the release v0.3.1 from the merged release pull request #36, although the tagged commit 4385ffd differs from main in a file under .github/workflows/.

Scenario: The App gets the permission and the run repeats

  • WHEN A person grants Workflows: Read and write to the release App and re-runs the Release workflow on main for the merge order 4385ffd then 8c7a717.
  • THEN The Release run succeeds, the release v0.3.1 exists, the log holds no Resource not accessible by integration, and chore(main): release 0.3.1 #36 has the label autorelease: tagged.

Existing Tool Considered

The alternatives block of 2026-12-01 in the issue body gives the verdict in-use for googleapis/release-please-action (https://github.com/googleapis/release-please-action, Apache-2.0, maintained); its Lacks: list gives what the tool does not do. The change keeps that tool and adds permission-workflows: write to the App token step at .github/workflows/release.yml:115, so it builds no code. A person grants the Workflows permission to the release App.

Key questions

  • Which form does the App token step of .github/workflows/release.yml use for its permissions?: It uses one permission-<name>: write input for each permission: permission-contents at line 115, permission-issues at line 116 and permission-pull-requests at line 117. The change adds permission-workflows: write in the same form, which is the GitHub App permission name Workflows. [sources: .github/workflows/release.yml:115, .github/workflows/release.yml:116, .github/workflows/release.yml:117]
  • What caused the Release runs 46468936924 and 46468946126 to fail?: The create-release endpoint needs a token with the workflows permission when the commit that the tag points to adds or modifies a file under .github/workflows/ relative to the default branch. The tagged commit 4385ffd holds the merge of chore(main): release 0.3.1 #36 and differs from main 8c7a717 in .github/workflows/lint.yml, and the App token step requests only contents, issues and pull-requests write. GitHub then answers the create-release request with Resource not accessible by integration. The note of the endpoint page states this requirement (fetched 2026-12-01). [sources: https://docs.github.com/rest/releases/releases#create-a-release, .github/workflows/release.yml:110, .github/workflows/release.yml:115]
  • Does a merge to main after the release pull request start its own Release run?: Yes. release-caller.yml runs on each push to main, so run 46468946126 is the run of the merge 8c7a717. The caller serializes the runs with the concurrency group release and cancel-in-progress: false, so the later run waits for the earlier run and does not race it. No retry job is needed. [sources: .github/workflows/release-caller.yml:8, .github/workflows/release-caller.yml:15, .github/workflows/release.yml:73]
  • How does the Release workflow create the release when a workflow change merges after the release pull request?: Add permission-workflows: write to the App token step of release.yml, and let a person grant the Workflows permission to the release App. Then the App token creates the tag of a commit whose workflow files differ from main, and each later push to main retries the release by itself. (best practice) [sources: https://docs.github.com/rest/releases/releases#create-a-release, .github/workflows/release.yml:115, https://github.com/googleapis/release-please-action]
    • Chosen: Grant workflows: write to the App token step and to the App. The endpoint note requires the workflows permission of the token, and the in-use action already creates the release from the merged pull request with that token. The two runs fail with the same permission error.
    • Rejected: Add a retry job for a failed Release run. It adds code and a loop risk. The retry repeats the same permission error, because the cause stays. No evidence shows a transient failure.
    • Rejected: Order the two merges by process. A person must remember the order, and a later workflow change breaks the order again. It does not give the token the missing permission.
  • Does the Release workflow need a concurrency group to serialize the runs?: No, both workflows already hold one. release-caller.yml sets the group release with cancel-in-progress: false, and release.yml sets github-workflows-release-${{ github.ref }} with cancel-in-progress: false. The evidence table shows the serial order: run 46468936924 started at 17:03:34, and run 46468946126 started at 17:03:47, after the first run ended. No change is needed. [sources: .github/workflows/release-caller.yml:15, .github/workflows/release-caller.yml:16, .github/workflows/release.yml:73, .github/workflows/release.yml:74]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    status/new
    on Nov 30, 2026
  2. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor
    • Priority: The release workflow runs are failing and no release is produced, which is a CI failure. The failed run 46468936924 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.
    • Related: ci(deps): release the updates of consumer-run tools #22, which asks for a different change. Both items stop a release-please release, but #22 is a missing commit-type mapping while this candidate is a token permission failure from a workflow merge order.
  3. added
    value/high
    effort/medium
    source/agent
    scope/ci
    priority/p1-high
    on Nov 30, 2026
  4. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor

    The cause is confirmed by the GitHub documentation of Create a release: when the commit of target_commitish adds or changes a file below .github/workflows/ compared with the default branch, the token must be able to change workflows. A GitHub App token then needs the repository permission "Workflows: write", and GITHUB_TOKEN cannot get it. The refusal can be 403 Resource not accessible by integration.

    Here #35 changed .github/workflows/lint.yml 3 seconds after the release pull request #36 merged, so commit 4385ffd differs from main. Each later run for v0.3.1 fails in the same way.

    Steps of a person (choose one):

    1. Create the release v0.3.1 on 4385ffd with an account whose token can change workflows, then replace the label autorelease: pending of chore(main): release 0.3.1 #36 with autorelease: tagged. The next release then holds fix(ci): keep the caller mise config out of the job Lint #35.
    2. Give the release App "Workflows: write", and make release.yml ask for permission-workflows: write. This also stops a repeat, and it lets the App change workflow files.
  5. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  6. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • release-please-action permission-workflows input GitHub App token, results: 5
    • release-please "Resource not accessible by integration" create release workflows permission, results: 5
    • googleapis release-please-action README token permissions contents pull-requests, results: 5
    • release-please manifest config release-type simple GitHub action, results: 5
    • release-please, results: 5
    • release-please-action permission-workflows, results: 5
    • github actions release please workflow token workflows write permission, results: 5
    • googleapis/release-please-action, results: 5
    • "release-please" action create release 403 workflows permission site:github.com, results: 5
    • release please action app token workflows permission input docs, results: 5

    Sources:

  7. added
    status/ready
    and removed
    status/new
    on Dec 1, 2026
  8. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  9. added
    owner/service
    on Dec 1, 2026
  10. 8 remaining items

  11. added
    status/blocked
    status/planned
    and removed
    owner/service
    status/in-progress
    status/blocked
    on Dec 1, 2026
  12. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at job by the rule continue: the runner Job devops-cli-implement-github-workflows-37-a23a24 ended without a result. The class ci_infra of the stop is one that a new attempt can fix. This is continuation 1 of 4 for this item. The item is Planned again. The Service takes it in the next round. The new Job takes the branch from origin, so it keeps the work that the run pushed there.

  13. added
    owner/service
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Dec 1, 2026
  14. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    The draft pull request #64 holds the final title and body. In mode on of roadmap.fix_checks.mode, the watch row marks it ready when its checks pass, and a fix-checks Job repairs a failed check whose name gives the class test, lint or types. In each other case the watch row stops the item: another failed check, a cancelled check, a conflict, a fix-checks Job that ended with no repair, or another mode.

    Spend: 12 model requests, 264701 input tokens, 1650 output tokens.

  15. removed
    owner/service
    on Dec 1, 2026
  16. removed
    status/in-review
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/cisource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions