Skip to content

ci: rename commitlint config to .mjs - #9

Merged
mkasperczyk90 merged 2 commits into
mainfrom
ci/release-please-automation
Jul 18, 2026
Merged

mkasperczyk90 merged 2 commits into
mainfrom
ci/release-please-automation

Conversation

@mkasperczyk90

Copy link
Copy Markdown
Owner

…lint

What and why

Replaces the manual "cut a tag to publish" flow with automated, Conventional-Commit-driven versioning. Merges no longer require hand-picking a version: Release Please computes the next version and changelog from commit types, and merging its release PR tags the commit and publishes to nuget.org.

How it works

merge feature/fix PRs -> Release Please opens/updates a "release PR" (version bump + CHANGELOG)
merge the release PR -> Release Please creates tag vX.Y.Z + GitHub Release
-> publish job (same run) packs and pushes to nuget.org

Bump level comes from the commit type: fix: → patch, feat: → minor, feat!: / BREAKING CHANGE: → major. Publishing happens only on a deliberate release, not on every merge.

Changes

  • .github/workflows/release.yml: reworked from a tag-triggered publish to push: main → release-please job + publish job (if: release_created). publish keeps the reviewed release environment and OIDC trusted publishing. It's a downstream job in the same run, so the default GITHUB_TOKEN is enough — no PAT needed.
  • release-please-config.json / .release-please-manifest.json (new): simple release type, include-component-in-tag: false so tags stay vX.Y.Z (matching the existing v1.0.0), and extra-files bumps <Version> in the csproj.
  • src/RuleCraft/RuleCraft.csproj: x-release-please-version marker on <Version> so it is bumped automatically.
  • .github/workflows/commitlint.yml + commitlint.config.js (new): enforces Conventional Commits on every PR to main (CI-side via wagoid action — no local Node/husky footprint). Prose commit bodies are exempt from the 100-char wrap rule.
  • CHANGELOG.md: reformatted to the Release Please layout so future auto-generated entries stay consistent.

Required repo settings (must be enabled for this to work)

  • Settings → Actions → General → Workflow permissions: "Read and write permissions" and "Allow GitHub Actions to create and approve pull requests" — otherwise Release Please cannot open the release PR.
  • release environment with required reviewers (gates the NuGet push).
  • Secret NUGET_USER present (unchanged).

Notes

  • Normal PRs still run the Build (ci.yml) workflow. The one exception is the Release-Please-authored release PR, which the default GITHUB_TOKEN does not trigger CI on; it only touches version + changelog, and ci.yml + the publish job's own dotnet test both run once it lands on main.
  • First release after this lands will be 1.0.1 (the commits since v1.0.0 are fixes).

…lint

## What and why

Replaces the manual "cut a tag to publish" flow with automated, Conventional-Commit-driven
versioning. Merges no longer require hand-picking a version: Release Please computes the next
version and changelog from commit types, and merging its release PR tags the commit and publishes
to nuget.org.

## How it works

merge feature/fix PRs  ->  Release Please opens/updates a "release PR" (version bump + CHANGELOG)
merge the release PR   ->  Release Please creates tag vX.Y.Z + GitHub Release
                       ->  `publish` job (same run) packs and pushes to nuget.org

Bump level comes from the commit type: `fix:` → patch, `feat:` → minor, `feat!:` / `BREAKING
CHANGE:` → major. Publishing happens only on a deliberate release, not on every merge.

## Changes

- **`.github/workflows/release.yml`**: reworked from a tag-triggered publish to `push: main` →
  `release-please` job + `publish` job (`if: release_created`). `publish` keeps the reviewed
  `release` environment and OIDC trusted publishing. It's a downstream job in the same run, so the
  default `GITHUB_TOKEN` is enough — no PAT needed.
- **`release-please-config.json` / `.release-please-manifest.json`** (new): `simple` release type,
  `include-component-in-tag: false` so tags stay `vX.Y.Z` (matching the existing `v1.0.0`), and
  `extra-files` bumps `<Version>` in the csproj.
- **`src/RuleCraft/RuleCraft.csproj`**: `x-release-please-version` marker on `<Version>` so it is
  bumped automatically.
- **`.github/workflows/commitlint.yml` + `commitlint.config.js`** (new): enforces Conventional
  Commits on every PR to main (CI-side via wagoid action — no local Node/husky footprint). Prose
  commit bodies are exempt from the 100-char wrap rule.
- **`CHANGELOG.md`**: reformatted to the Release Please layout so future auto-generated entries
  stay consistent.

## Required repo settings (must be enabled for this to work)

- **Settings → Actions → General → Workflow permissions**: "Read and write permissions" **and**
  "Allow GitHub Actions to create and approve pull requests" — otherwise Release Please cannot open
  the release PR.
- **`release` environment** with required reviewers (gates the NuGet push).
- Secret **`NUGET_USER`** present (unchanged).

## Notes

- Normal PRs still run the Build (`ci.yml`) workflow. The one exception is the Release-Please-authored
  release PR, which the default `GITHUB_TOKEN` does not trigger CI on; it only touches version +
  changelog, and `ci.yml` + the publish job's own `dotnet test` both run once it lands on main.
- First release after this lands will be **1.0.1** (the commits since `v1.0.0` are fixes).
@mkasperczyk90 mkasperczyk90 changed the title ci: automate versioning and publishing with Release Please and commit… ci: rename commitlint config to .mjs Jul 17, 2026
@mkasperczyk90
mkasperczyk90 force-pushed the ci/release-please-automation branch from 93f5afd to 1e37fdc Compare July 18, 2026 20:45
@mkasperczyk90
mkasperczyk90 merged commit 47a3064 into main Jul 18, 2026
5 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