Skip to content

ci: v2/main's release workflow is stale — it lacks main's OIDC/dist-tag/token-scope fixes #1902

Description

@cliffhall

Discovered while building the v2.1.0 milestone-merge resolution branch (#1901).

What

After resolving the merge, .github/workflows/main.yml is the only file where the merged tree differs from v2/main — main carries 38 lines v2/main has never had:

Commit Change
#1831 least-privilege default permissions: contents: read for GITHUB_TOKEN
#1834 derive the npm dist-tag from the version, so a prerelease can't publish to latest
#1836 publish via npm OIDC trusted publishing (id-token: write + environment: release), removing the NODE_AUTH_TOKEN/NPM_TOKEN path that doesn't exist in this repo

Those landed on main during the 2.0.0 rc series and were never brought back to v2/main. They auto-merged cleanly into the resolution branch, so the v2.1.0 release is not at risk — main keeps them.

Why it still matters

v2/main is the develop branch, so its copy of the release workflow is the one every future PR edits. Today that copy:

  • publishes with NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} against a secret the repo does not have, and
  • has no dist-tag derivation, so publishing a -rc from it would point latest at a release candidate.

Nothing breaks while releases are cut from main — but the divergence is a live trap: anyone editing workflows on v2/main works from the stale version, and a future change could silently regress main back to it. This is also the only content main has that v2/main lacks, so closing it makes the two branches identical outside the merge lineage.

Suggested fix

Port the three changes onto v2/main (a plain forward-port of the workflow hunks — not a back-merge of main, per the #1868 reasoning). Afterward, git diff origin/main origin/v2/main over .github/ should be empty.

Related

Activity

  1. added this to the v2.2.0 milestone on Aug 2, 2026
  2. modified the milestones: v2.2.0, v2.1.0 on Aug 2, 2026
  3. cliffhall commented on Aug 2, 2026

    @cliffhall
    MemberAuthor

    Closed by #1904, squash-merged into v2/main as 07a2b4bd. (Auto-close doesn't fire here — Closes #N only closes on PRs targeting the default branch, and v2 PRs target v2/main.)

    v2/main's release workflow is now byte-identical to main's.

  4. self-assigned this
    on Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions