-
Notifications
You must be signed in to change notification settings - Fork 4
Description
What
Automate updating example version numbers in documentation and code examples to always reflect the latest version during the prepare release step in the release workflow. Solutions to consider:
- Programmatically retrieve the latest version, e.g., from Maven/Gradle.
- Use a find-and-replace approach in key example files as part of CI/CD.
- Consider using scripting (e.g., shell, Python) within GitHub Actions to update all example version numbers.
- Evaluate more sophisticated tools that parse and rewrite example code blocks if needed.
Evaluation criteria: - Reliability/robustness as workflow changes
- Minimizing false positives or missed updates
- Ease of maintenance
- Transparency of changes in PRs
Why
Manual updates of example version numbers are error-prone and often forgotten, leading to confusion for users who copy-paste outdated examples. Automating this step as part of the release workflow aligns examples with the latest release and improves user experience and documentation quality.
Notes
Potential implementation: Add a CI step that runs after the version bump—uses a script to find and replace old version numbers in README.md, docs, and example source files. Explore using regular expressions for flexibility, but validate that only targeted examples are changed. Document the new step for contributors. Optionally review available GitHub Action/pipeline utilities that specialize in this type of chore.