-
Notifications
You must be signed in to change notification settings - Fork 79
ci: replace changelog gate with release-please and conventional commits #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andre-stefanov
wants to merge
6
commits into
develop
Choose a base branch
from
chore/ci-and-releases
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0f38fe2
ci: Implement new CI and release workflow
andre-stefanov 1a85737
ci: Update action versions in workflows for consistency and improvements
andre-stefanov eef4b85
ci: updated release-please-manifest to current version
andre-stefanov 83e50c5
ci: renamed Changelog.md to CHANGELOG.md to match release-please defa…
andre-stefanov 94875da
doc: adjusted mention of CHANGELOG.md
andre-stefanov 9ad670b
docs: update release process documentation for clarity and consistency
andre-stefanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: 'Setup PlatformIO' | ||
| description: 'Sets up Python and PlatformIO for build and test jobs' | ||
|
|
||
| inputs: | ||
| install-matrix-deps: | ||
| description: 'Install matrix build dependencies from requirements_matrix_build.txt' | ||
| required: false | ||
| default: 'false' | ||
| install-unit-test-deps: | ||
| description: 'Install unit test dependencies (gcovr)' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.x' | ||
| - name: Install PlatformIO | ||
| shell: bash | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install wheel platformio | ||
| - name: Install matrix build dependencies | ||
| if: inputs.install-matrix-deps == 'true' | ||
| shell: bash | ||
| run: pip install -r requirements_matrix_build.txt | ||
| - name: Install unit test dependencies | ||
| if: inputs.install-unit-test-deps == 'true' | ||
| shell: bash | ||
| run: pip install gcovr | ||
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| pr-title-lint: | ||
| name: PR Title (Conventional Commits) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: read | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v6 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| unit-tests: | ||
| name: Unit Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: ./.github/actions/setup-pio | ||
| with: | ||
| install-unit-test-deps: 'true' | ||
|
andre-stefanov marked this conversation as resolved.
|
||
| - name: Run unit tests | ||
| run: pio test -e native -v | ||
| - name: Publish Coverage Summary | ||
| if: always() | ||
| run: | | ||
| echo "## Native Unit Test Coverage" >> "$GITHUB_STEP_SUMMARY" | ||
| echo >> "$GITHUB_STEP_SUMMARY" | ||
| if [ -f .pio/coverage.md ]; then | ||
| cat .pio/coverage.md >> "$GITHUB_STEP_SUMMARY" | ||
| else | ||
| echo "Coverage report was not generated." >> "$GITHUB_STEP_SUMMARY" | ||
| fi | ||
|
|
||
| build: | ||
| name: Build (${{ matrix.board }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| board: | ||
| - mksgenlv21 | ||
| - mksgenlv2 | ||
| - mksgenlv1 | ||
| - esp32 | ||
| - ramps | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: ./.github/actions/setup-pio | ||
| with: | ||
| install-matrix-deps: 'true' | ||
| - name: Build ${{ matrix.board }} | ||
| run: python matrix_build.py -b ${{ matrix.board }} | ||
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Release Please | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: googleapis/release-please-action@v5 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| config-file: release-please-config.json | ||
| manifest-file: .release-please-manifest.json |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "1.13.20" | ||
| } |
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Release Process | ||
|
|
||
| This document describes how releases are managed for OpenAstroTracker-Firmware. It is intended for project developers with write access to the repository. | ||
|
|
||
| ## Overview | ||
|
|
||
| Releases are fully automated via [release-please](https://github.com/googleapis/release-please). The process requires no manual version bumping or changelog editing — both are driven by PR titles following the [Conventional Commits](https://www.conventionalcommits.org/) specification. | ||
|
|
||
| ``` | ||
| PR merged → release-please updates its Release PR → maintainer merges Release PR → tag + GitHub Release created automatically | ||
| ``` | ||
|
|
||
| ## Conventional Commits (required for all PRs) | ||
|
|
||
| Every PR title **must** follow this format: | ||
|
|
||
| ``` | ||
| <type>: <short description> | ||
| ``` | ||
|
|
||
| CI will reject PR titles that do not conform. | ||
|
|
||
| | Type | Triggers | Example | | ||
| |------|----------|---------| | ||
| | `feat!` or `BREAKING CHANGE:` footer | major version bump | `feat!: remove legacy serial protocol` | | ||
| | `feat` | minor version bump | `feat: add AZ/ALT steps-per-degree Meade command` | | ||
| | `fix` | patch version bump | `fix: correct sidereal rate after meridian flip` | | ||
| | `perf` | patch version bump | `perf: reduce interrupt latency in stepper ISR` | | ||
| | `chore` | no version bump | `chore: update platformio dependencies` | | ||
| | `docs` | no version bump | `docs: clarify wiring diagram for RAMPS` | | ||
| | `refactor` | no version bump | `refactor: extract stepper configuration logic` | | ||
| | `test` | no version bump | `test: add unit tests for DayTime rollover` | | ||
| | `ci` | no version bump | `ci: update clang-format action version` | | ||
|
|
||
| The description becomes the changelog entry, so write it as a user-facing statement of what changed — not what you did internally. | ||
|
|
||
| ## How release-please Works | ||
|
|
||
| After each PR is merged into `develop`, the `release-please` GitHub Action updates an open **Release PR**. This PR: | ||
|
|
||
| - Accumulates all `feat`, `fix`, and other notable commits since the last release | ||
| - Proposes the next semantic version (patch / minor / major based on commit types) | ||
| - Updates `CHANGELOG.md` with categorised entries linked to PRs | ||
| - Updates `Version.h` with the new version string | ||
|
|
||
| The Release PR stays open and self-updates as more PRs are merged. When you are ready to cut a release, simply **merge the Release PR**. | ||
|
|
||
| ## Cutting a Release | ||
|
|
||
| 1. Review the open Release PR (titled `chore(main): release V<version>`) — check the proposed version and changelog entries. | ||
| 2. Merge it into `develop`. | ||
| 3. `release-please` automatically: | ||
| - Creates a git tag `V<version>` (e.g. `V1.14.0`) | ||
| - Publishes a GitHub Release with the generated changelog | ||
|
|
||
| No manual tag pushing, no manual `Version.h` edits. | ||
|
|
||
| ## Version Semantics | ||
|
|
||
| Versions follow [Semantic Versioning](https://semver.org/) (`MAJOR.MINOR.PATCH`): | ||
|
|
||
| | Change | Bump | | ||
| |--------|------| | ||
| | Breaking change in Meade protocol or configuration | **Major** | | ||
| | New feature, new board support, new Meade command | **Minor** | | ||
| | Bug fix, performance improvement | **Patch** | | ||
| | Chore, CI, refactor, test, docs | **None** | | ||
|
|
||
| ## CI Checks on Every PR | ||
|
|
||
| All of the following must pass before a PR can be merged: | ||
|
|
||
| | Check | What it validates | | ||
| |-------|------------------| | ||
| | **PR Title (Conventional Commits)** | PR title follows `<type>: <description>` format | | ||
| | **Unit Tests** | `pio test -e native` passes | | ||
| | **Build (mksgenlv21)** | Firmware compiles for MKS Gen L V2.1 | | ||
| | **Build (mksgenlv2)** | Firmware compiles for MKS Gen L V2 | | ||
| | **Build (mksgenlv1)** | Firmware compiles for MKS Gen L V1 | | ||
| | **Build (esp32)** | Firmware compiles for ESP32 | | ||
| | **Build (ramps)** | Firmware compiles for RAMPS | | ||
| | **clang-format** | Code formatting matches `.clang-format`; auto-fixed on same-repo branches | | ||
|
|
||
| ## Firmware Binaries | ||
|
|
||
| Pre-built binaries are **not** published in GitHub Releases. Because the firmware is configured via generated header files (stepper drivers, sensors, display type, etc.), a generic binary would not be usable without recompilation. Users must build the firmware for their specific hardware configuration using PlatformIO. | ||
|
|
||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
| "release-type": "simple", | ||
| "tag-prefix": "V", | ||
| "packages": { | ||
| ".": { | ||
| "release-type": "simple", | ||
| "extra-files": [ | ||
|
andre-stefanov marked this conversation as resolved.
|
||
| { | ||
| "type": "generic", | ||
| "path": "Version.h" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.