Skip to content

fix(release): bump plugin.json and marketplace.json on tag-push releases#124

Merged
arnaudlh merged 1 commit into
mainfrom
fix/release-workflow-bump-on-tag-push
May 26, 2026
Merged

fix(release): bump plugin.json and marketplace.json on tag-push releases#124
arnaudlh merged 1 commit into
mainfrom
fix/release-workflow-bump-on-tag-push

Conversation

@arnaudlh
Copy link
Copy Markdown
Member

Why

The release workflow's Commit version bump step is gated to workflow_dispatch only:

- name: Commit version bump (workflow_dispatch only)
  if: github.event_name == 'workflow_dispatch' && steps.bump.outputs.changed == 'true'

So when a release is created the normal way — by pushing a tag (git push origin vX.Y.Z), which is also what gh release create does — the bumped plugin.json and .github/plugin/marketplace.json are used in-process to build the VSIX but never committed back to main.

That's why after v0.0.2 and v0.0.3 shipped, main was still pinned at 0.0.1 and CHANGELOG.md didn't exist. The downstream Update CHANGELOG.md on main step likely also opened a changelog/<tag> PR each time that nobody merged.

The drift on main is being corrected separately in #123.

What

Rework the post-release main-update step so it lands the version bump and the changelog entry in a single commit on main, regardless of whether the release was triggered by tag-push or workflow_dispatch.

  • Rename: Update CHANGELOG.md on mainBump version files and update CHANGELOG.md on main
  • After git checkout -B changelog-update origin/main, re-apply the same jq bumps used by the earlier Bump plugin.json and marketplace.json step against the freshly-checked-out main tree.
  • Extend the diff-skip check, git add, and commit message to cover plugin.json + .github/plugin/marketplace.json.
  • Rename the fallback PR branch from changelog/<tag> to release/<tag> and broaden its title + body.
  • Behaviour preserved:
    • workflow_dispatch flow continues to commit the bump + tag from the dispatching branch before VSIX assembly (the earlier step is untouched). The new step is idempotent there — git diff --quiet skips when there's nothing to land.
    • Prereleases (-rc.x etc.) remain skipped on the main-bump.
    • VSIX assembly path is unchanged.

Validation

$ actionlint .github/workflows/git-ape-release.yml
$ echo $?
0

Full end-to-end validation needs a tag-push release; the natural next opportunity is the next time we cut a tag.

The 'Commit version bump' step that lands plugin.json + marketplace.json
on the source branch is gated to workflow_dispatch only. On the normal
tag-push trigger (git push origin vX.Y.Z, or 'gh release create' which
pushes a tag), the bumped files are used in-process to build the VSIX
but never committed back to main.

Result: after v0.0.2 and v0.0.3 shipped via tag push, main was still at
0.0.1, and the post-release 'Update CHANGELOG.md on main' step left a
dangling 'changelog/<tag>' PR each time (since main lacked the bump,
that PR also did not bring the bump in).

Fix: extend the post-release main-update step to re-apply the version
bump against the freshly-checked-out main tree, and stage plugin.json +
.github/plugin/marketplace.json alongside CHANGELOG.md in the same
commit. The push (or fallback PR) now lands the bump and the changelog
entry together.

- Renames the step to 'Bump version files and update CHANGELOG.md on main'
- Re-applies the same jq bumps used by the earlier 'Bump' step
- Adds plugin.json + marketplace.json to the diff check and 'git add'
- Renames the fallback PR branch from 'changelog/<tag>' to 'release/<tag>'
  and updates its title/body to reflect the broader scope
- Prereleases (-rc.x etc.) are still skipped, matching prior behaviour

Workflow file passes actionlint.
@arnaudlh arnaudlh merged commit eb6fe8f into main May 26, 2026
5 checks passed
@arnaudlh arnaudlh deleted the fix/release-workflow-bump-on-tag-push branch May 26, 2026 09: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