Repository navigation
feat: promote floating tags after release publication - #160
Open
joshjohanning wants to merge 7 commits into
Open
joshjohanning wants to merge 7 commits into
joshjohanning wants to merge 7 commits into
Conversation
- 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]>
Co-authored-by: Copilot App <[email protected]>
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]>
Contributor
There was a problem hiding this comment.
🟡 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
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]>
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]>
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: main |
| if (confirmedRelease.draft || confirmedRelease.tag_name !== version) { | ||
| throw new Error(`Release ${version} could not be confirmed as published`); | ||
| } | ||
| await promoteReleaseTags(octokit, context, confirmedRelease, publishMinorVersion); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
mode: promotepath that verifies therelease.publishedevent and confirms the live release before moving floating tags.release_workflow_fileso the release commit can retain itsrelease.publishedlistener in both GitHub API and Git CLI commit paths, with validation for direct workflow paths.@v3.Rollout
Merge and publish the action release so
v3is updated before merging the companion joshjohanning/sync-github-repo-settings#95; that repository automatically syncs its settings on pushes tomain.Validation
npm install --ignore-scripts --allow-git=nonenpm run all(90 tests pass; lint, coverage, formatting, and ncc packaging succeed)