Skip to content

fix: move floating major tag from release-please workflow#10

Merged
phramz merged 1 commit into
mainfrom
fix/release-please-moves-major-tag
Apr 17, 2026
Merged

fix: move floating major tag from release-please workflow#10
phramz merged 1 commit into
mainfrom
fix/release-please-moves-major-tag

Conversation

@phramz

@phramz phramz commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The standalone update-major-tag workflow never fires for release-please releases, because tag pushes made with GITHUB_TOKEN do not trigger downstream workflows. Result: v1 was stuck on v1.0.0 after v1.0.1 shipped, breaking uses: buildrush/setup-php@v1 consumers (the old src/index.js lacked the API-based tag resolution and 404'd on releases/download/v1/...).
  • Move the major-tag logic into release-please.yml itself so it runs in the same workflow that created the release, sidestepping the trigger restriction.
  • The v1 floating tag was force-moved to v1.0.1 out of band to unblock consumers immediately.

Test plan

  • Next release-please release moves the corresponding vN tag automatically.
  • update-major-tag.yml can be removed in a follow-up once verified.

The standalone update-major-tag workflow does not fire when release-please
pushes the version tag, because workflows triggered by GITHUB_TOKEN do not
trigger downstream workflows. Move the tag in the same workflow that
created the release so the major tag stays in sync with each release.
@phramz
phramz merged commit 1852579 into main Apr 17, 2026
9 checks passed
@phramz
phramz deleted the fix/release-please-moves-major-tag branch April 17, 2026 09:57
phramz added a commit that referenced this pull request Apr 17, 2026
Standalone tag-triggered workflows (release-action, update-major-tag)
never fired for release-please releases because tag pushes made with the
default GITHUB_TOKEN do not trigger downstream workflows. This left
v1.0.1 and v1.1.0 with no phpup-linux-amd64 asset, breaking
`uses: buildrush/setup-php@v1` consumers whose action JS resolves the
release tag and tries to download from `releases/download/<tag>/...`.

Fold the build + upload steps (and the already-migrated major-tag move)
into release-please.yml so they run in the same job that creates the
release -- same pattern PR #10 used for the major-tag move. Delete the
now-redundant release-action.yml and update-major-tag.yml.

After this change no workflow triggers on `push: tags: ...`, closing the
class of bug entirely.
phramz added a commit that referenced this pull request Apr 17, 2026
Standalone tag-triggered workflows (release-action, update-major-tag)
never fired for release-please releases because tag pushes made with the
default GITHUB_TOKEN do not trigger downstream workflows. This left
v1.0.1 and v1.1.0 with no phpup-linux-amd64 asset, breaking
`uses: buildrush/setup-php@v1` consumers whose action JS resolves the
release tag and tries to download from `releases/download/<tag>/...`.

Fold the build + upload steps (and the already-migrated major-tag move)
into release-please.yml so they run in the same job that creates the
release -- same pattern PR #10 used for the major-tag move. Delete the
now-redundant release-action.yml and update-major-tag.yml.

After this change no workflow triggers on `push: tags: ...`, closing the
class of bug entirely.
phramz added a commit that referenced this pull request Apr 17, 2026
A standalone `v1` GitHub Release (uploaded out-of-band when PR #10
force-pushed the v1 git tag and triggered the old release-action.yml)
was still pinning `@v1` consumers to stale v1.0.1-era assets: the
resolver found /releases/tags/v1 -> 200 and returned `v1`, downloading
the pre-coverage-install binary that made PHPUnit report "No code
coverage driver available / No tests executed".

Codify the contract that the vN git tag is a `uses:` convenience and
must never have a matching release:

- src/index.js:resolveReleaseTag skips /releases/tags/<ref> for
  floating-major refs (/^v\d+$/), resolving through /releases/latest +
  major-match. Also propagates 404 as an error for specific-version
  pins (/^v\d+\.\d+\.\d+/) instead of silently substituting latest
  (which violated pin reproducibility).
- release-please.yml adds a defense-in-depth step that deletes any
  standalone vN release after each release cut.
- Unit tests cover the regression directly (ignores a standalone
  floating-major release) plus the pin-respect tightening.
- CLAUDE.md documents the release-artifact contract.

Post-merge cleanup (out of band): `gh release delete v1 v1.0.1 v1.1.0`
to purge the stale + empty-asset releases while keeping the git tags.
phramz added a commit that referenced this pull request Apr 17, 2026
A standalone `v1` GitHub Release (uploaded out-of-band when PR #10
force-pushed the v1 git tag and triggered the old release-action.yml)
was still pinning `@v1` consumers to stale v1.0.1-era assets: the
resolver found /releases/tags/v1 -> 200 and returned `v1`, downloading
the pre-coverage-install binary that made PHPUnit report "No code
coverage driver available / No tests executed".

Codify the contract that the vN git tag is a `uses:` convenience and
must never have a matching release:

- src/index.js:resolveReleaseTag skips /releases/tags/<ref> for
  floating-major refs (/^v\d+$/), resolving through /releases/latest +
  major-match. Also propagates 404 as an error for specific-version
  pins (/^v\d+\.\d+\.\d+/) instead of silently substituting latest
  (which violated pin reproducibility).
- release-please.yml adds a defense-in-depth step that deletes any
  standalone vN release after each release cut.
- Unit tests cover the regression directly (ignores a standalone
  floating-major release) plus the pin-respect tightening.
- CLAUDE.md documents the release-artifact contract.

Post-merge cleanup (out of band): `gh release delete v1 v1.0.1 v1.1.0`
to purge the stale + empty-asset releases while keeping the git tags.
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