Skip to content

fix(ci): make a pushed tag actually release again - #21

Merged
Fiona2016 merged 1 commit into
publishfrom
fix/tag-triggered-release
Aug 7, 2026
Merged

fix(ci): make a pushed tag actually release again#21
Fiona2016 merged 1 commit into
publishfrom
fix/tag-triggered-release

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

Releasing is supposed to be: push a tag, deploy-auto.yml takes it from there. That has not worked since v0.0.5 — v0.0.5, v0.0.6 and v0.0.7 all shipped through the manual workflow instead, and yarn release needed a hand-applied git config before it would even get as far as tagging.

version Automatic Deployment
v0.0.4-alpha.2 success
v0.0.5 (twice) · v0.0.6 · v0.0.7 failure

1. Checkout could not check out the tag

fatal: Cannot fetch both <commit-sha> and refs/tags/v0.0.7 to refs/tags/v0.0.7

The workflow is triggered by the tag, so the tag is the ref being checked out and is already there. Asking for fetch-tags on top adds a second refspec pointing at the same refs/tags/*, and git refuses. Removed from all five checkouts here.

deploy-manual.yml keeps the flag, and needs it — it runs from a branch, where the tag is not the ref and check-release.js would otherwise not find it. That asymmetry is now written down in the workflow rather than left to be rediscovered.

Nothing else in this workflow needs tags: check-release.js resolves v<version>, which is the checked-out ref.

The failure was safe — it happened in checkout, so deploy-prod and publish-npm were skipped and nothing was ever published by mistake. But it produced a failed run and a notify-failure on every release, and left the real path undiscoverable.

2. yarn release died before tagging

lerna version starts with git remote update, which fetches every remote and recurses into their submodules. Branches on the upstream fork reference rum-events-format commits that its own remote does not serve:

fatal: remote error: upload-pack: not our ref d143baca...
Errors during submodule fetch: rum-events-format
error: could not fetch upstream

Nothing in a release reads upstream, so cmd_release now keeps it out of that update. Doing it there rather than in someone's .git/config means it holds on any clone — this was previously worked around by hand, on one machine.

Guarded on the remote existing, and idempotent.

Verified

  • git remote update fails, then passes once the guard has run — checked by clearing the config and re-running it.
  • No empty with: blocks left behind in the workflow.

The checkout fix can only be proven by the next tag push, since that is the trigger. If it still fails, nothing publishes — the failure mode is unchanged and safe.

Two things stood between a tag and a release, and both had to be worked
around by hand every time.

Checkout failed before any job did real work. This workflow is triggered *by*
the tag, so the tag is the ref being checked out and is already present —
asking for `fetch-tags` on top makes checkout fetch the commit and the tag
into the same `refs/tags/*`, which git refuses. That took down every
tag-triggered release from v0.0.5 onward; v0.0.5, v0.0.6 and v0.0.7 all went
out through the manual workflow instead. `deploy-manual.yml` keeps the flag,
and needs it: it runs from a branch, where the tag is not the ref.

`yarn release` failed before that, on the machine running it. `lerna version`
starts with `git remote update`, which fetches every remote and recurses into
their submodules; branches on the upstream fork reference `rum-events-format`
commits its own remote does not serve. Nothing in a release reads upstream,
so it is now kept out of that update — from the release command itself, so it
holds on any clone rather than on whichever machine happened to be configured.
@Fiona2016
Fiona2016 merged commit 872f7f6 into publish Aug 7, 2026
5 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.

1 participant