Skip to content

Update docs and release automation#4

Merged
RareBird15 merged 4 commits into
mainfrom
lanie/auto-publish-and-docs
Apr 10, 2026
Merged

Update docs and release automation#4
RareBird15 merged 4 commits into
mainfrom
lanie/auto-publish-and-docs

Conversation

@RareBird15

Copy link
Copy Markdown
Owner

Update documentation and improve release automation for the Bible Reader project.

What Changed

  • Enhanced the GitHub Actions workflow for creating releases and publishing to PyPI.
  • Updated installation instructions in the README to clarify usage of uv and pip.
  • Added a section for requesting support.

Why

  • Streamlined the release process and ensured users have clear installation guidance.

Validation

  • uvx ruff check .
  • uv run python -m unittest discover tests -v
  • I tested the affected workflow manually, if applicable

Accessibility Review

  • I considered how this change sounds in a screen reader, not just how it looks in a terminal
  • I did not add decorative ASCII, visual-only cues, or formatting that makes output harder to read aloud
  • Prompts, labels, and headings remain plain, predictable, and understandable

Content and Policy Review

  • I did not commit copyrighted EPUBs or generated plan content without explicit rights
  • I updated documentation if user-visible behavior changed
  • I updated CHANGELOG.md if this change is user-visible

Notes for Reviewers

  • Review the changes in the release workflow and ensure the installation instructions are clear for users.

Copilot AI review requested due to automatic review settings April 10, 2026 01:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 uv vs pip, and adds a “Request Support” section.
  • Enhances the release workflow to generate release notes from CHANGELOG.md and 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.

Comment thread .github/workflows/release.yml Outdated
TAG_NAME: ${{ github.ref_name }}
run: |
set -eu
VERSION="${TAG_NAME#v}"

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
VERSION="${TAG_NAME#v}"

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +23
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Build package distribution
run: uv build
- name: Build package distribution
run: uv build

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to 24
- name: Build package distribution
run: uv build

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +41 to 66
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)

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +88 to 91
### 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:

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml
@RareBird15 RareBird15 added documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code labels Apr 10, 2026

@RareBird15 RareBird15 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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>

Copilot AI commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

@copilot Please do another review.

Addressed all outstanding review feedback in commit 2ca8573:

  • Python version pin: Added uv python install 3.11 in create-release (matching the CI workflow pattern)
  • Tag/version guard: Added a step that reads the version from pyproject.toml and fails the job if it doesn't match the pushed tag
  • Single build: Package is now built once in create-release, uploaded via actions/upload-artifact@v4, and downloaded in publish-pypi via actions/download-artifact@v4 — eliminating the duplicate build

The previous commits already covered removing the unused VERSION variable, making CHANGELOG failures hard errors, and aligning the README heading dots.

@RareBird15 RareBird15 self-assigned this Apr 10, 2026
@RareBird15 RareBird15 merged commit 3d5a3e3 into main Apr 10, 2026
4 checks passed
@RareBird15 RareBird15 deleted the lanie/auto-publish-and-docs branch April 10, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants