Skip to content

Fix GetVersionNumber always computing v3.0.0-rc.1 by preventing duplicate release branch config - #1470

Draft
ndorin with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-getversionnumber-job
Draft

Fix GetVersionNumber always computing v3.0.0-rc.1 by preventing duplicate release branch config#1470
ndorin with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-getversionnumber-job

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The shared essentialsplugins-getversion.yml template unconditionally replaces replace-me-feature-branch/replace-me-prerelease placeholders in .releaserc.json for every non-main branch. On the release branch this injected a second "name": "release" entry alongside the hardcoded one, leaving semantic-release unable to identify v3.0.0-rc.1 as the prior rc release — so it recomputed v3.0.0-rc.1 every run and failed with fatal: tag 'v3.0.0-rc.1' already exists.

Changes

  • Inline getVersion job — replaces the reusable uses: …/essentialsplugins-getversion.yml@main call with the equivalent inline steps, giving this repo control over the substitution guards.
  • Guard placeholder replacement steps — both Replace branch name and Replace prerelease name steps now skip for release and development in addition to main, preventing the duplicate branch entry:
# before (shared template)
if: steps.get_branch.outputs.branch != 'main'

# after (inline, this repo)
if: |
  steps.get_branch.outputs.branch != 'main' &&
  steps.get_branch.outputs.branch != 'release' &&
  steps.get_branch.outputs.branch != 'development'

With the duplicate removed, semantic-release finds v3.0.0-rc.1 as the last rc release and correctly increments to v3.0.0-rc.2 on the next commit.

  • Preserve runTests dependency — the runTests → getVersion → build-4Series job chain is maintained to match the current release branch structure.
  • Pin gha-find-replace to @v3 instead of @master.

…prevent duplicate release config

Co-authored-by: ndorin <18535240+ndorin@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job getVersion / GetVersionNumber Fix GetVersionNumber always computing v3.0.0-rc.1 by preventing duplicate release branch config Aug 21, 2026
Copilot AI requested a review from ndorin August 21, 2026 16:20
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