Update docs and release automation#4
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates end-user documentation and expands the GitHub Actions release workflow so that version tag pushes create a GitHub Release and also publish the package to PyPI.
Changes:
- Refreshes README installation guidance for
uvvspip, and adds a “Request Support” section. - Enhances the release workflow to generate release notes from
CHANGELOG.mdand publish artifacts to both GitHub Releases and PyPI. - Improves README formatting (badges and heading punctuation).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| README.md | Updates badges, simplifies installation instructions, tweaks quick-start wording, and adds a support-request section. |
| .github/workflows/release.yml | Re-indents/cleans the workflow and adds a new publish-pypi job using Trusted Publishing (OIDC). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| TAG_NAME: ${{ github.ref_name }} | ||
| run: | | ||
| set -eu | ||
| VERSION="${TAG_NAME#v}" |
There was a problem hiding this comment.
The shell variable VERSION is set but never used (the embedded Python reads TAG_NAME directly). Removing it avoids confusion and keeps the step minimal.
| VERSION="${TAG_NAME#v}" |
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
|
|
||
| - name: Build package distribution | ||
| run: uv build | ||
| - name: Build package distribution | ||
| run: uv build |
There was a problem hiding this comment.
The release workflow builds the package without pinning/installing a Python version (unlike CI, which runs uv python install ...). For reproducible builds and to avoid ubuntu-latest Python upgrades breaking releases, add an explicit Python install/select step (e.g., 3.11) before uv build in both jobs.
| - name: Build package distribution | ||
| run: uv build | ||
|
|
There was a problem hiding this comment.
Now that tags trigger an automated PyPI publish, add a guard that verifies the Git tag version matches the package version (e.g., from pyproject.toml). Without this, it’s possible to publish a different version than the tag/release notes indicate, leading to inconsistent GitHub Releases vs PyPI artifacts.
| if not changelog.exists(): | ||
| out.write_text( | ||
| f"Release {version}\n\nSee repository history for details.\n", | ||
| encoding="utf-8", | ||
| ) | ||
| raise SystemExit(0) | ||
|
|
||
| text = changelog.read_text(encoding="utf-8") | ||
| text = changelog.read_text(encoding="utf-8") | ||
|
|
||
| pattern = re.compile( | ||
| rf"^## \[{re.escape(version)}\].*?$\n(.*?)(?=^## \[|\Z)", | ||
| re.M | re.S, | ||
| ) | ||
| match = pattern.search(text) | ||
| pattern = re.compile( | ||
| rf"^## \[{re.escape(version)}\].*?$\n(.*?)(?=^## \[|\Z)", | ||
| re.M | re.S, | ||
| ) | ||
| match = pattern.search(text) | ||
|
|
||
| if not match: | ||
| out.write_text( | ||
| ( | ||
| f"Release {version}\n\n" | ||
| "No matching changelog section was found. " | ||
| "Please update CHANGELOG.md.\n" | ||
| ), | ||
| encoding="utf-8", | ||
| ) | ||
| raise SystemExit(0) | ||
| if not match: | ||
| out.write_text( | ||
| ( | ||
| f"Release {version}\n\n" | ||
| "No matching changelog section was found. " | ||
| "Please update CHANGELOG.md.\n" | ||
| ), | ||
| encoding="utf-8", | ||
| ) | ||
| raise SystemExit(0) | ||
|
|
There was a problem hiding this comment.
If CHANGELOG.md is missing or the tagged version section isn’t found, the workflow currently exits successfully and continues to create a GitHub Release (and will also publish to PyPI). Consider failing the job in these cases so releases aren’t published without a matching changelog entry.
| ### 1. One-Time Setup (From EPUB) | ||
|
|
||
| If you are starting from a new WorldBiblePlans EPUB, run this sequence from the project root: | ||
| If you are starting from a new WorldBiblePlans EPUB, create a folder for your plan and run this sequence: | ||
|
|
There was a problem hiding this comment.
The headings in this section are now inconsistent: ### 1. ... is unescaped, but the subsequent headings still use escaped dots (### 2\. / ### 3\.). For consistent Markdown (and screen reader output), use the same numbering style for all three headings.
RareBird15
left a comment
There was a problem hiding this comment.
@copilot Please do another review.
…ease workflow Agent-Logs-Url: https://github.com/RareBird15/bible-reader/sessions/14baaa63-0678-4c00-91d1-937c8c85819e Co-authored-by: RareBird15 <13343932+RareBird15@users.noreply.github.com>
Addressed all outstanding review feedback in commit 2ca8573:
The previous commits already covered removing the unused |
Update documentation and improve release automation for the Bible Reader project.
What Changed
uvandpip.Why
Validation
uvx ruff check .uv run python -m unittest discover tests -vAccessibility Review
Content and Policy Review
CHANGELOG.mdif this change is user-visibleNotes for Reviewers