Skip to content

Run the pub.dev publish job in the pub.dev environment - #13

Merged
jamiewest merged 1 commit into
mainfrom
claude/hopeful-edison-j4x5n6
Sep 27, 2026
Merged

jamiewest merged 1 commit into
mainfrom
claude/hopeful-edison-j4x5n6

Conversation

@jamiewest

Copy link
Copy Markdown
Owner

Why

The re-run of the extensions-v0.8.1 publish (run 35653172734, attempt 2) passed the tag check. The pub.dev tag pattern now matches extensions-v{{version}}. It then failed on the next check:

The calling GitHub Action is not allowed to publish, because: publishing is configured to only be allowed from actions with an environment, this token originates from an action running in environment 'null'

pub.dev's automated-publishing settings require the pub.dev GitHub Actions environment, and the publish job declared none. pub.dev checks the tag pattern before the environment, so the first failure (the tag mismatch) hid this one.

What

  • publish.yml: the publish job declares environment: pub.dev. GitHub creates the environment on the first run that names it.
  • Header comment:
    • Lists the environment requirement alongside the tag patterns in the one-time pub.dev setup.
    • Warns that a "protected branches only" deployment rule on that environment would refuse every tag-triggered run.
    • Drops the stale "if the flutter publish races ahead, re-run it" advice. Since Fix the auto-tag push auth, and stop the two publishes racing #12, auto-tag.yml waits for extensions to reach pub.dev before pushing the extensions_flutter tag.
    • Explains that a tag-triggered run uses the workflow as of the tagged commit.

After merging: the tag has to move

extensions-v0.8.1 points at adbe895, which still has the old workflow. Re-running that run again will fail the same way. To publish:

  1. Delete the tag: git push origin :refs/tags/extensions-v0.8.1, or use the repo's Tags page.
  2. Run Auto-tag releases on main. It re-creates extensions-v0.8.1 at the new main using RELEASE_PAT, which fires this workflow. Once 0.8.1 is live, it pushes extensions_flutter-v0.6.0.

extensions_flutter needs the same pub.dev settings (tag pattern extensions_flutter-v{{version}}, environment pub.dev).

Validation

YAML parses and the job carries environment: pub.dev with id-token: write. Nothing else in the job changed. This can only really be proven by a tag-triggered run, which is step 2 above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K3TbUE73aGPvFr1vqBLQbf


Generated by Claude Code

The re-run of the extensions-v0.8.1 publish got past the tag check (the
pub.dev tag pattern now matches extensions-v{{version}}) and failed on the
next one:

  The calling GitHub Action is not allowed to publish, because: publishing
  is configured to only be allowed from actions with an environment, this
  token originates from an action running in environment 'null'

pub.dev's automated-publishing settings require the `pub.dev` GitHub Actions
environment, and the publish job declared none. pub.dev checks the tag
pattern before the environment, so this requirement was hidden behind the
earlier tag mismatch. The job now declares `environment: pub.dev`; GitHub
creates the environment on the first run that names it.

Header updated to match:

* Lists the environment requirement next to the tag patterns in the one-time
  pub.dev setup, and warns that a "protected branches only" deployment rule
  on the environment would refuse every tag-triggered run.
* Drops the "if the flutter publish races ahead, re-run it" advice, stale
  since auto-tag.yml started waiting for extensions to reach pub.dev before
  pushing the extensions_flutter tag.
* Notes that a tag-triggered run uses the workflow as of the tagged commit,
  so "Re-run failed jobs" picks up a pub.dev-side fix but never a fix to
  this file. That is the case right now: extensions-v0.8.1 points at
  adbe895, which has the old workflow, so the tag has to be deleted and
  re-created at main (re-running auto-tag.yml does that) after this merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3TbUE73aGPvFr1vqBLQbf
@jamiewest
jamiewest merged commit 5d82c8f into main Sep 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants