Conversation
- Add semantic version support to build_release.sh (v1.0.0 format) - Add version constants to firmware for build-time injection - Create GitHub Actions workflow for automated releases (release.yml) - Create GitHub Actions workflow for compile testing (test.yml) - Add RELEASE_PROCESS.md documentation for maintainers - Update UPLOAD_GUIDE.md to direct users to GitHub Releases - Update docs/README.md with release information and versioning strategy - Update .gitignore to exclude release artifacts - Remove outdated BACKLOG.md and customer_expectations.md - Switch primary branch to 'main'
…rkflow
The arduino-cli install script installs to ./bin, not $HOME/bin. Use full
path via ${{ github.workspace }}/bin/arduino-cli to ensure tool is found
before PATH environment updates take effect.
There was a problem hiding this comment.
Pull request overview
This PR establishes the release infrastructure for the SledLink project, transitioning from initial development documentation to a production-ready release process. The changes remove preliminary planning documents and introduce comprehensive release automation.
Key Changes
- Adds release process documentation and GitHub Actions workflows for automated building and releasing
- Updates firmware files to include version information (v1.0.0) that can be displayed and tracked
- Implements build script improvements with semantic versioning validation
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/customer_expectations.md | Removed initial customer expectations document (no longer needed) |
| docs/BACKLOG.md | Removed detailed development backlog (work completed or moved elsewhere) |
| docs/RELEASE_PROCESS.md | Added comprehensive release process documentation with step-by-step instructions |
| docs/README.md | Added release versioning information and download links |
| UPLOAD_GUIDE.md | Added section on getting SledLink releases from GitHub |
| build_release.sh | Enhanced with semantic version validation and improved README generation with variable expansion |
| arduino/SledController/SledController.ino | Added FIRMWARE_DISPLAY_VERSION and BUILD_VERSION constants for version tracking |
| arduino/JudgeController/JudgeController.ino | Added FIRMWARE_DISPLAY_VERSION and BUILD_VERSION constants for version tracking |
| .github/workflows/test.yml | Added automated compile testing workflow for pull requests and pushes |
| .github/workflows/release.yml | Added automated build and release workflow triggered by version tags |
| .gitignore | Added entries to ignore release artifacts and ZIP files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| TAG="${GITHUB_REF#refs/tags/}" | ||
| if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]]; then | ||
| echo "ERROR: Tag must match semantic version format (v1.2.3)" |
There was a problem hiding this comment.
The error message on line 25 states the expected format as "v1.2.3" but the regex pattern on line 24 also accepts pre-release versions like "v1.2.3-beta". The error message should be updated to reflect this: "Expected: v1.2.3 or v1.2.3-prerelease" to accurately describe what formats are accepted.
| echo "ERROR: Tag must match semantic version format (v1.2.3)" | |
| echo "ERROR: Tag must match semantic version format (v1.2.3 or v1.2.3-prerelease)" |
| - **MINOR** (v3.1.0): New features, backward compatible | ||
| - **PATCH** (v3.0.1): Bug fixes, backward compatible | ||
|
|
||
| Current firmware displays "v3.0" - this is independent of release version. |
There was a problem hiding this comment.
The documentation references firmware version "v3.0" but the actual firmware files in this PR define FIRMWARE_DISPLAY_VERSION as "v1.0.0". This inconsistency could confuse users. The documentation should be updated to reference "v1.0.0" instead of "v3.0".
| Current firmware displays "v3.0" - this is independent of release version. | |
| Current firmware displays "v1.0.0" - this is independent of release version. |
| git tag -a v3.0.1 -m "Release v3.0.1: Bug fixes and improvements" | ||
|
|
||
| # Push tag to GitHub | ||
| git push origin v3.0.1 | ||
| ``` | ||
|
|
||
| ### 3. Monitor GitHub Actions | ||
|
|
||
| 1. Go to: https://github.com/thompcd/SledLink/actions | ||
| 2. Watch the "Build and Release" workflow | ||
| 3. It will: | ||
| - Validate the tag | ||
| - Install dependencies | ||
| - Compile both firmwares | ||
| - Create release package | ||
| - Create GitHub release | ||
| - Upload ZIP file | ||
|
|
||
| ### 4. Verify Release | ||
|
|
||
| 1. Go to: https://github.com/thompcd/SledLink/releases | ||
| 2. Check that your release appears with: | ||
| - Correct version number | ||
| - ZIP file attached | ||
| - Generated changelog | ||
| - Installation instructions | ||
|
|
||
| ### 5. Edit Release Notes (Optional) | ||
|
|
||
| You can enhance the auto-generated release notes: | ||
|
|
||
| 1. Click "Edit" on the release | ||
| 2. Add highlights, known issues, or additional context | ||
| 3. Save | ||
|
|
||
| ## Pre-Release Versions | ||
|
|
||
| For beta or RC versions, add a suffix: | ||
|
|
||
| ```bash | ||
| git tag -a v3.1.0-beta.1 -m "Beta release for testing" | ||
| git push origin v3.1.0-beta.1 | ||
| ``` | ||
|
|
||
| GitHub will automatically mark these as "Pre-release". | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Build Failed | ||
|
|
||
| 1. Check the Actions log for the error | ||
| 2. Common issues: | ||
| - Syntax error in code | ||
| - Missing library dependency | ||
| - Build script issue | ||
| 3. Fix the issue, create a new tag (v3.0.2) | ||
|
|
||
| ### Wrong Version Released | ||
|
|
||
| 1. Delete the tag locally: `git tag -d v3.0.1` | ||
| 2. Delete the tag remotely: `git push --delete origin v3.0.1` | ||
| 3. Delete the GitHub release (manually on GitHub) | ||
| 4. Create correct tag | ||
|
|
||
| ### Manual Release (Emergency) | ||
|
|
||
| If GitHub Actions is down: | ||
|
|
||
| ```bash | ||
| # Run build script locally | ||
| ./build_release.sh v3.0.1 | ||
|
|
||
| # Create release manually on GitHub | ||
| # Upload release/SledLink-v3.0.1.zip | ||
| ``` | ||
|
|
||
| ## Maintainer Workflow Example | ||
|
|
||
| ### Scenario: Bug Fix Release | ||
|
|
||
| ```bash | ||
| # Developer finds and fixes encoder bug | ||
| git checkout -b fix/encoder-bug | ||
| # ... make changes ... | ||
| git commit -m "Fix encoder overflow on long pulls" | ||
| git push origin fix/encoder-bug | ||
|
|
||
| # Create PR, get review, merge to main | ||
|
|
||
| # Maintainer creates release | ||
| git checkout main | ||
| git pull | ||
| git tag -a v3.0.1 -m "Release v3.0.1: Fix encoder overflow" | ||
| git push origin v3.0.1 | ||
|
|
||
| # GitHub Actions automatically: | ||
| # - Builds firmware | ||
| # - Creates release | ||
| # - Uploads ZIP | ||
| # - Generates changelog | ||
|
|
||
| # Maintainer verifies on GitHub Releases page | ||
| # Users download SledLink-v3.0.1.zip | ||
| ``` | ||
|
|
||
| ### Scenario: New Feature Release | ||
|
|
||
| ```bash | ||
| # Developer adds WiFi config UI | ||
| git checkout -b feature/wifi-config | ||
| # ... make changes ... | ||
| git commit -m "Add WiFi configuration web UI" | ||
| git push origin feature/wifi-config | ||
|
|
||
| # Create PR, get review, merge to main | ||
|
|
||
| # Update firmware display version if major change | ||
| # Edit arduino/*/Controller.ino: #define FIRMWARE_DISPLAY_VERSION "v3.1" | ||
|
|
||
| # Maintainer creates release | ||
| git checkout main | ||
| git pull | ||
| git tag -a v3.1.0 -m "Release v3.1.0: WiFi configuration UI" |
There was a problem hiding this comment.
All example version numbers throughout this document reference "v3.0.x" or "v3.1.x" (lines 31, 86, 90, 91, 101, 104, 123, 148, 153) but the actual firmware version in the codebase is "v1.0.0". For consistency and to avoid confusion, the examples should use version numbers starting from v1.0.0 (e.g., v1.0.1, v1.1.0) to match the actual project state.
| RELEASE INFORMATION | ||
| ------------------- | ||
| Version: $VERSION | ||
| Firmware: v1.0.0 |
There was a problem hiding this comment.
The hardcoded firmware version "v1.0.0" in the README template doesn't match the actual FIRMWARE_DISPLAY_VERSION defined in the Arduino controller files, which is also "v1.0.0". While currently matching, this creates a maintenance burden as it needs to be manually kept in sync. Consider reading the firmware version from the source files or documenting that this needs to be updated when the firmware version changes.
| Firmware: v1.0.0 | |
| Firmware: $VERSION |
| - name: Install arduino-cli | ||
| run: | | ||
| curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh | ||
| echo "$PWD/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install ESP32 platform | ||
| run: | | ||
| ${{ github.workspace }}/bin/arduino-cli config init | ||
| ${{ github.workspace }}/bin/arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | ||
| ${{ github.workspace }}/bin/arduino-cli core update-index | ||
| ${{ github.workspace }}/bin/arduino-cli core install esp32:esp32 | ||
| ${{ github.workspace }}/bin/arduino-cli lib install "LiquidCrystal" |
There was a problem hiding this comment.
The workflow uses hardcoded paths like "${{ github.workspace }}/bin/arduino-cli" throughout steps 22-27. This path reference is correct, but the pattern is inconsistent with step 19 which uses "$PWD/bin". Consider using "${{ github.workspace }}/bin" consistently in step 19 as well for clarity and maintainability.
| - name: Install arduino-cli | ||
| run: | | ||
| curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh | ||
| echo "$PWD/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install ESP32 platform and dependencies | ||
| run: | | ||
| ${{ github.workspace }}/bin/arduino-cli config init | ||
| ${{ github.workspace }}/bin/arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | ||
| ${{ github.workspace }}/bin/arduino-cli core update-index | ||
| ${{ github.workspace }}/bin/arduino-cli core install esp32:esp32 | ||
| ${{ github.workspace }}/bin/arduino-cli lib install "LiquidCrystal" |
There was a problem hiding this comment.
The workflow uses hardcoded paths like "${{ github.workspace }}/bin/arduino-cli" throughout steps 42-46. This path reference is correct, but the pattern is inconsistent with step 38 which uses "$PWD/bin". Consider using "${{ github.workspace }}/bin" consistently in step 38 as well for clarity and maintainability.
| # Validate semantic version format (v1.2.3) or date format (YYYY.MM.DD) | ||
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]] && \ | ||
| [[ ! "$VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then | ||
| echo "ERROR: Invalid version format: $VERSION" | ||
| echo "Expected: v1.2.3, v1.2.3-beta, or YYYY.MM.DD" |
There was a problem hiding this comment.
The regex pattern for pre-release versions allows alphanumeric characters with a single hyphen prefix (e.g., v1.2.3-beta), but according to semantic versioning specification, pre-release versions can have multiple dot-separated identifiers (e.g., v1.2.3-beta.1, v1.2.3-rc.2). The current pattern should be updated to: ^v[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]+(.[a-zA-Z0-9]+)*)?$ to fully comply with semver.
| # Validate semantic version format (v1.2.3) or date format (YYYY.MM.DD) | |
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]] && \ | |
| [[ ! "$VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then | |
| echo "ERROR: Invalid version format: $VERSION" | |
| echo "Expected: v1.2.3, v1.2.3-beta, or YYYY.MM.DD" | |
| # Validate semantic version format (v1.2.3, v1.2.3-beta.1, etc.) or date format (YYYY.MM.DD) | |
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$ ]] && \ | |
| [[ ! "$VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then | |
| echo "ERROR: Invalid version format: $VERSION" | |
| echo "Expected: v1.2.3, v1.2.3-beta, v1.2.3-beta.1, or YYYY.MM.DD" |
No description provided.