Skip to content

chore(ci): split publish into release + prerelease jobs to mirror MongoDB#47

Merged
poxet merged 2 commits into
masterfrom
chore/align-ci-with-mongodb
May 11, 2026
Merged

chore(ci): split publish into release + prerelease jobs to mirror MongoDB#47
poxet merged 2 commits into
masterfrom
chore/align-ci-with-mongodb

Conversation

@poxet
Copy link
Copy Markdown
Contributor

@poxet poxet commented May 11, 2026

Summary

Aligns Cache's build.yml with MongoDB's build.yml so the CI run summary shows which publish path took:

  • Before: one publish job with internal branching → only publish in the run summary
  • After: separate release (push to master) and prerelease (PR) jobs → both appear in every run, one runs and the other is skipped

Also brings over the "Comment released version on merged PR" step that parses the PR# from the merge-commit message and posts the GitHub Release link back to the merging PR.

Changes

  • Split publish into top-level release (master push, env release) and prerelease (PR, env prerelease) jobs
  • Add pull-requests: write permission (needed by gh pr comment)
  • Inline per-job version computation; drop the combined shell branch
  • Add "Comment released version on merged PR" step on release

Unchanged: build/security jobs, MAJOR_MINOR='0.4', warning threshold (10), test filter ((Category!=Integration)&(Category!=TimeCritical)), package list, NuGet/GitHub Release scripting.

Test plan

  • YAML structure matches MongoDB's
  • CI green on this PR (PR build should fire buildsecurityprerelease ran, release skipped)
  • After merge, master build should fire buildsecurityrelease ran (with PR comment), prerelease skipped

Out of scope (separate concern)

MAJOR_MINOR='0.4' means published versions are 0.4.X, but Tharga.Cache.csproj is at <Version>1.1.0</Version>. CI overrides via -p:PackageVersion=..., so .csproj is decorative at publish time. Worth deciding whether to bump MAJOR_MINOR (e.g. to 1.1) so the published series matches the .csproj — but that's a release-versioning policy decision, not a CI topology one.

…DB pipeline

- Replace single `publish` job with two top-level jobs (`release`, `prerelease`)
  so the CI summary shows which path ran on each build (release on push to
  master, prerelease on PR — the other appears as `skipped`).
- Add `pull-requests: write` permission and the "Comment released version on
  merged PR" step that posts the NuGet release link back to the merging PR.
- Inline the per-job version computation (stable in release, pre in
  prerelease) instead of one combined block with shell branching.

No change to the build/security jobs, version scheme, warning threshold,
test filter, or package list.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@poxet poxet merged commit 661fb91 into master May 11, 2026
5 of 6 checks passed
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