Skip to content

Commit 40bbbeb

Browse files
authored
fix(docs): close the async code fence, and give each tag a GitHub release (#43)
Two escapes in the README were written as the literal characters \n rather than newlines, so the asynchronous usage fence neither opened nor closed. On PyPI every section after it, supported versions, documentation links, provenance verification and the maintenance notes, rendered inside the code block. Visible at https://pypi.org/project/flat-api/2.0.0/ Checked the rest: all twelve fences in the README now pair up, none carry an escape, and no other markdown file in this repository or the other three clients has the same problem. Publishing also now creates a GitHub release for the tag rather than leaving it bare. A tag on its own tells a reader nothing and notifies nobody; a release carries the version's changelog section and reaches anyone watching this repository. The notes are extracted from CHANGELOG.md by heading, falling back to a pointer at the file when a version has no section. This needs contents: write, which the workflow did not have.
1 parent 024fc34 commit 40bbbeb

4 files changed

Lines changed: 29 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
tags: ['[0-9]+.[0-9]+.[0-9]+']
1010

1111
permissions:
12-
contents: read
12+
contents: write # create the GitHub release for the tag
1313
id-token: write # OIDC for PyPI trusted publishing and provenance (FR-021a, FR-021b)
1414

1515
jobs:
@@ -48,3 +48,20 @@ jobs:
4848
uses: pypa/gh-action-pypi-publish@release/v1
4949
with:
5050
attestations: true
51+
52+
# A bare tag tells a reader nothing. This gives the version a page carrying its changelog
53+
# section, and it is what a watcher of this repository is notified about.
54+
- name: Publish the GitHub release
55+
env:
56+
GH_TOKEN: ${{ github.token }}
57+
run: |
58+
TAG="${GITHUB_REF_NAME}"
59+
NOTES="$(awk -v tag="$TAG" '
60+
$0 ~ "^## \\[?" tag {found=1; next}
61+
found && /^## / {exit}
62+
found {print}
63+
' CHANGELOG.md)"
64+
[ -n "$NOTES" ] || NOTES="See CHANGELOG.md for the changes in $TAG."
65+
printf '%s\n\n---\n\nInstall: `pip install flat-api==%s`\n' "$NOTES" "$TAG" \
66+
> /tmp/notes.md
67+
gh release create "$TAG" --title "$TAG" --notes-file /tmp/notes.md --verify-tag

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [2.0.1](https://github.com/FlatIO/api-client-python/compare/2.0.0...2.0.1) (2026-09-10)
4+
5+
### Bug Fixes
6+
7+
* **docs:** close the asynchronous usage code fence in the README. Two escapes had been written as the literal characters `\n` rather than newlines, so the fence never opened or closed and every section after it rendered inside the code block on PyPI.
8+
39
## [1.1.3](https://github.com/FlatIO/api-client-python/compare/v1.1.2...v1.1.3) (2024-03-08)
410

511

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ except FlatNotFoundError:
5252

5353
### Asynchronous use
5454

55-
```python\nfrom flat_api import AsyncFlatClient
55+
```python
56+
from flat_api import AsyncFlatClient
5657

5758
client = AsyncFlatClient(access_token="YOUR_TOKEN")
58-
# every operation is awaitable\n```
59+
# every operation is awaitable
60+
```
5961

6062
## Supported versions
6163

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0
1+
2.0.1

0 commit comments

Comments
 (0)