diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml new file mode 100644 index 000000000..07d33c244 --- /dev/null +++ b/.github/workflows/conventional-pr.yml @@ -0,0 +1,19 @@ +name: conventional-pr-title + +# PRs are squash-merged, so the PR title becomes the commit message on main +# that release-please reads. This check requires titles to follow +# conventional commits (feat:, fix:, docs:, ci:, chore:, ...). +on: + pull_request_target: + types: [opened, edited, synchronize, reopened] + +permissions: + pull-requests: read + +jobs: + lint-pr-title: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..430319b60 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,21 @@ +name: release-please + +# Release automation: conventional commits on main accumulate into a release +# PR that bumps the version in pixi.toml and updates CHANGELOG.md; merging +# that PR tags vX.Y.Z and cuts a GitHub release. +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + config-file: release-please-config.json + manifest-file: .release-please-manifest.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 000000000..001eb2cd1 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.2" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..964441543 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing to FIRE + +PRs are welcome! Please run the test suite and the formatters before +submitting: + +```bash +pixi run test +pixi run fmt +``` + +## Conventional commits and releases + +Releases are automated with +[release-please](https://github.com/googleapis/release-please): conventional +commits on `main` accumulate into a release PR that bumps the version in +`pixi.toml` and updates `CHANGELOG.md`; merging that PR tags the release. + +PRs are squash-merged, so **the PR title must follow +[conventional commits](https://www.conventionalcommits.org)** (CI enforces +this): + +- `feat: ...` — new feature; bumps the minor version (`0.2.x` → `0.3.0`). + Note that FIRE output directories are versioned by major.minor (e.g. + `-v0.2-`), so a minor bump changes output paths. +- `fix: ...` — bug fix; bumps the patch version (`0.2.0` → `0.2.1`) and does + not change output paths. +- `feat!: ...` or `fix!: ...` — breaking change; also bumps the minor version + while we are pre-1.0. +- `docs: ...`, `ci: ...`, `chore: ...`, `test: ...`, `refactor: ...` — no + release. diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..08822c054 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bootstrap-sha": "92b9ea22d9c26baedde217ffd4f24cf9829553f0", + "bump-minor-pre-major": true, + "include-component-in-tag": false, + "packages": { + ".": { + "release-type": "simple", + "changelog-path": "CHANGELOG.md", + "extra-files": [ + { + "type": "toml", + "path": "pixi.toml", + "jsonpath": "$.workspace.version" + } + ] + } + } +}