feat: Release Please Implementation - #36
Open
thejoeker12 wants to merge 2 commits into
Open
Conversation
Adds a workflow_call trigger (version/tag inputs) to release.yml alongside the existing push:tags path, closing the gap noted in this PR's description. Also fixes two related issues that would otherwise surface only once release-please actually invoked this workflow: - create-release: softprops/action-gh-release needs an explicit tag_name, since github.ref on a workflow_call run is the branch that triggered release-please.yml (main), not the tag. - publish-docker: docker/metadata-action's type=semver macros only resolve against an actual refs/tags/* ref; replaced with type=raw tags derived from the resolved VERSION so image tagging works identically on both entry points. release-please-config.json gains draft:true + force-tag-creation:true so release-please creates the tag immediately but leaves the release as a draft with its own changelog body; create-release then updates that same release (append_body:true, generate_release_notes skipped on this path) to attach NuGet artifacts rather than creating a competing release.
Contributor
|
Thanks for this - solid design on the version single-source-of-truth and the \AssemblyInformationalVersionAttribute-based --version\ fix (that's a genuine improvement over what I'd written). Since maintainer edits are enabled, I pushed a follow-up commit (
Happy to discuss/adjust any of it - wanted to be upfront about exactly what changed and why rather than just push silently. |
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.
Hey! Consider using Release-please for your version control. This implementation may not work for you immediately but, adapt it with some AI knowledge and it should make your work a little easier when managing releases.
These links explain the frameworks it utilises:
https://semver.org/
https://www.conventionalcommits.org/en/v1.0.0/
Adopt release-please for versioning and releases
Replaces manual version bumping with release-please. One line in Directory.Build.props becomes the
single source of truth for the product version, and every other place the version appears is either
derived from it at build time or rewritten by release-please on release.
Single source of truth
Directory.Build.props now carries 2.5.0 with an x-release-please-version
annotation. Both SignalSentinel.Core.csproj and SignalSentinel.Scanner.csproj had their own
elements removed and now inherit it.
What release-please rewrites
release-please-config.json (release-type simple, bootstrap-sha pinned to d6b32ad) drives updates to:
have no inline comment syntax
the version is a discrete token the updater can find
ghcr.io/...:2.5.0 reference
.release-please-manifest.json seeds the current version at 2.5.0.
The Dockerfile OCI label moves from a literal 2.5.0 to ${VERSION}, so CI builds passing --build-arg
VERSION= label correctly while local builds fall back to the annotated default.
Scanner --version
Program.cs now reads AssemblyInformationalVersionAttribute (split on + to drop the SourceLink commit
SHA) rather than Assembly.GetName().Version. The assembly version is a four-part numeric quad, so
MSBuild strips semver prerelease labels from it — a 2.6.0-rc.1 build would have reported itself as
plain 2.6.0. Falls back to the old path, then 0.0.0.
Package metadata
PackageReleaseNotes in the scanner csproj was ~120 lines of hand-maintained per-version changelog;
it now points at CHANGELOG.md, which release-please will generate. The Description also drops its
version-specific narrative so it doesn't go stale between releases.
DefaultRules.json churn
The astCodes arrays reformat from single-line to multi-line. This is cosmetic — release-please's
json updater rewrites the whole file with its own formatting, so doing it now keeps future release
commits to a one-line diff.
Repo settings needed before this works
Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" must be
enabled, or the release PR can't be opened. The workflow deliberately uses the default GITHUB_TOKEN
(no PAT, no App).
Known gap — release.yml is not wired up yet
release-please.yml invokes uses: ./.github/workflows/release.yml with version and tag inputs, but
release.yml is unchanged on this branch: it still only has on: push: tags: ['v*'], declares no
workflow_call trigger, and no inputs. As written the release job will fail workflow validation.
release.yml also derives its version from ${GITHUB_REF#refs/tags/v} in four places, which won't
resolve under workflow_call from a push to main, and its dotnet pack -p:Version= contradicts the new
"never set Version via -p:Version" comment in Directory.Build.props. Either that follow-up lands in
this PR or it needs to merge before the first release-please PR is merged.
Separately, neither commit since the bootstrap SHA (bcaa857, c3833d6) uses conventional-commit
syntax, so no release PR will open until the next feat:/fix: lands. That's expected, just worth
knowing so it doesn't read as a broken workflow.
Verifying