Skip to content

feat: promote floating tags after release publication - #160

Open
joshjohanning wants to merge 7 commits into
mainfrom
joshjohanning-release-tag-promotion
Open

joshjohanning wants to merge 7 commits into
mainfrom
joshjohanning-release-tag-promotion

Conversation

@joshjohanning

@joshjohanning joshjohanning commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add a mode: promote path that verifies the release.published event and confirms the live release before moving floating tags.
  • Keep draft publishing limited to the exact version tag; promote major and optional minor aliases only for the newest stable release in their version lines, targeting the release tag's peeled commit.
  • Add release_workflow_file so the release commit can retain its release.published listener in both GitHub API and Git CLI commit paths, with validation for direct workflow paths.
  • Bootstrap this repository's own publish/promotion workflow through the locally bundled action rather than the old published @v3.
  • Serialize publication and promotion in the repository workflow and examples to prevent concurrent alias rollbacks.
  • Document the new inputs and behaviors, and cover draft, promotion, prerelease, ordering, unprefixed semantic tags, and workflow preservation in tests.

Rollout

Merge and publish the action release so v3 is updated before merging the companion joshjohanning/sync-github-repo-settings#95; that repository automatically syncs its settings on pushes to main.

Validation

  • npm install --ignore-scripts --allow-git=none
  • npm run all (90 tests pass; lint, coverage, formatting, and ncc packaging succeed)
  • Verified Git pathspec excludes the selected workflow from removal.

joshjohanning and others added 2 commits October 31, 2026 06:18
- Draft releases now push only the exact version tag; v<major>/v<major>.<minor> are no longer moved
- Add `mode: promote` to move floating tags to a published release's existing tag commit (no rebuild), for use on release.published
- Promotion skips prereleases and never moves a floating tag backwards (backports)
- Non-draft releases promote floating tags right after the release is confirmed published

Co-authored-by: Copilot App <[email protected]>
Keep the configured release.published listener in release tags for both commit paths, and bootstrap this action's own publishing through the newly bundled local implementation.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 11:26
joshjohanning and others added 2 commits October 31, 2026 06:27
Validate the retained listener exists, delete only .github blobs without removing ancestor trees, and promote from the bundled release tag.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An unresolved publication and promotion race allows an older release to move the floating alias backward after a newer release has been promoted.

3 open issues
What changed in this PR

This PR separates draft publishing from floating-tag promotion so action consumers receive published stable releases rather than draft builds.

Changes:

  • Adds promotion mode with live-release validation, version ordering, and release-tag commit resolution.
  • Adds workflow preservation and updates this repository’s workflow to use the locally bundled action.
  • Documents the new behavior, expands tests, and bumps the version to 3.2.0.
File Description
src/​index.js Implements promotion and release-workflow preservation.
README.md Documents inputs, promotion behavior, and draft-release setup.
package.json Bumps the action version to 3.2.0.
package-lock.json Synchronizes the package version.
badges/​coverage.svg Updates reported coverage to 95.88%.
action.yml Declares new inputs and clarifies draft behavior.
.github/​workflows/​publish.yml Adds release-triggered promotion using local action builds.
__tests__/​index.test.js Covers promotion, draft handling, and workflow preservation.

Review effort: Balanced

Comment thread src/index.js Resolved
Comment thread src/index.js Resolved
Comment thread README.md Resolved
joshjohanning and others added 3 commits October 31, 2026 06:31
Share the repository concurrency group across push, manual, and release runs; document cross-workflow coordination and queue compatibility.

Co-authored-by: Copilot App <[email protected]>
Retain version 3.2.0 and the release-promotion changes while incorporating main's dependency and Dependabot updates.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Publishing can build the wrong commit and misattribute the release, while failed promotion cannot be recovered through a rerun, leaving floating tags stale.

2 open issues
3 resolved since last review

Review effort: Balanced

steps:
- uses: actions/checkout@v7
with:
ref: main
Comment thread src/index.js
if (confirmedRelease.draft || confirmedRelease.tag_name !== version) {
throw new Error(`Release ${version} could not be confirmed as published`);
}
await promoteReleaseTags(octokit, context, confirmedRelease, publishMinorVersion);
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