Summary
Replace semantic-release (npm) with release-please (GitHub Action) for automated versioning and publishing. This eliminates npm devDependencies and simplifies the release pipeline.
Mirrors: camunda/orchestration-cluster-api-js#84
Background
We are switching to standard semver (major locked to server minor). The custom server:/server-major: commit types are no longer needed. release-please supports standard conventional commits natively with zero local dependencies.
Changes required
1. Add release-please config
Create release-please-config.json:
{
"release-type": "simple",
"prerelease": true,
"prerelease-type": "alpha",
"include-component-in-tag": false,
"packages": { ".": {} },
"extra-files": [
"src/Camunda.Orchestration.Sdk/Camunda.Orchestration.Sdk.csproj"
]
}
Create .release-please-manifest.json with the current version.
2. Rewrite release workflow
Replace the current release.yml with a single workflow that:
- Job 1: Generate + test + commit drift (existing logic)
- Job 2 (needs Job 1): Run
googleapis/release-please-action@v4
- If releasable commits exist → opens/updates a release PR →
gh pr merge --auto --squash
- If merged release PR detected →
release_created=true → dotnet pack + dotnet nuget push with OIDC provenance (NuGet/login@v1)
Requires a PAT or GitHub App token (stored as RELEASE_PAT secret) so that PR merge triggers the next workflow run.
3. Handle stable/* branches
Use target-branch: ${{ github.ref_name }} to support both main (alpha prereleases) and stable/* (stable releases). On stable/* branches, set "prerelease": false in the config (or override via branch-specific config).
4. Remove old release tooling
- Delete
release.config.cjs
- Delete
commitlint.config.cjs (keep if commit linting is still desired in CI)
- Remove from
package.json devDependencies:
semantic-release
@semantic-release/changelog
@semantic-release/exec
@semantic-release/git
@commitlint/cli
@commitlint/config-conventional
- Delete
package.json and package-lock.json entirely if no npm dependencies remain
5. Keep existing functionality
- CHANGELOG.md generation (built into release-please)
- GitHub Release creation with source tarball
- NuGet publish via
dotnet nuget push with OIDC provenance
.csproj <Version> tag updates (via extra-files)
prepare-release.sh / publish-nuget.sh scripts (adapt as needed)
- Spec snapshot archival
- Docs deployment on
main
Considerations
- PAT requirement:
GITHUB_TOKEN events don't trigger workflows. A fine-grained PAT or GitHub App token (scoped to this repo, contents: write + pull-requests: write) is needed for auto-merge to trigger the publish run.
- Latency: Similar to current flow. Push → PR updated (~30s) → CI → auto-merge → publish.
- Generated code drift: Must be committed before release-please runs. Keep drift commit in Job 1, release-please in Job 2.
- Version in .csproj: release-please's
extra-files feature can update the <Version> tag in Camunda.Orchestration.Sdk.csproj, replacing what prepare-release.sh currently does via sed.
- Issue success comments: Current
@semantic-release/github leaves comments on referenced issues. This feature is lost (minor).
Summary
Replace
semantic-release(npm) withrelease-please(GitHub Action) for automated versioning and publishing. This eliminates npm devDependencies and simplifies the release pipeline.Mirrors: camunda/orchestration-cluster-api-js#84
Background
We are switching to standard semver (major locked to server minor). The custom
server:/server-major:commit types are no longer needed.release-pleasesupports standard conventional commits natively with zero local dependencies.Changes required
1. Add release-please config
Create
release-please-config.json:{ "release-type": "simple", "prerelease": true, "prerelease-type": "alpha", "include-component-in-tag": false, "packages": { ".": {} }, "extra-files": [ "src/Camunda.Orchestration.Sdk/Camunda.Orchestration.Sdk.csproj" ] }Create
.release-please-manifest.jsonwith the current version.2. Rewrite release workflow
Replace the current
release.ymlwith a single workflow that:googleapis/release-please-action@v4gh pr merge --auto --squashrelease_created=true→dotnet pack+dotnet nuget pushwith OIDC provenance (NuGet/login@v1)Requires a PAT or GitHub App token (stored as
RELEASE_PATsecret) so that PR merge triggers the next workflow run.3. Handle
stable/*branchesUse
target-branch: ${{ github.ref_name }}to support bothmain(alpha prereleases) andstable/*(stable releases). Onstable/*branches, set"prerelease": falsein the config (or override via branch-specific config).4. Remove old release tooling
release.config.cjscommitlint.config.cjs(keep if commit linting is still desired in CI)package.jsondevDependencies:semantic-release@semantic-release/changelog@semantic-release/exec@semantic-release/git@commitlint/cli@commitlint/config-conventionalpackage.jsonandpackage-lock.jsonentirely if no npm dependencies remain5. Keep existing functionality
dotnet nuget pushwith OIDC provenance.csproj<Version>tag updates (viaextra-files)prepare-release.sh/publish-nuget.shscripts (adapt as needed)mainConsiderations
GITHUB_TOKENevents don't trigger workflows. A fine-grained PAT or GitHub App token (scoped to this repo,contents: write+pull-requests: write) is needed for auto-merge to trigger the publish run.extra-filesfeature can update the<Version>tag inCamunda.Orchestration.Sdk.csproj, replacing whatprepare-release.shcurrently does viased.@semantic-release/githubleaves comments on referenced issues. This feature is lost (minor).