diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10e8d24..ec4e18d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: tags: ['[0-9]+.[0-9]+.[0-9]+'] permissions: - contents: read + contents: write # create the GitHub release for the tag id-token: write # OIDC for PyPI trusted publishing and provenance (FR-021a, FR-021b) jobs: @@ -48,3 +48,20 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: attestations: true + + # A bare tag tells a reader nothing. This gives the version a page carrying its changelog + # section, and it is what a watcher of this repository is notified about. + - name: Publish the GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + TAG="${GITHUB_REF_NAME}" + NOTES="$(awk -v tag="$TAG" ' + $0 ~ "^## \\[?" tag {found=1; next} + found && /^## / {exit} + found {print} + ' CHANGELOG.md)" + [ -n "$NOTES" ] || NOTES="See CHANGELOG.md for the changes in $TAG." + printf '%s\n\n---\n\nInstall: `pip install flat-api==%s`\n' "$NOTES" "$TAG" \ + > /tmp/notes.md + gh release create "$TAG" --title "$TAG" --notes-file /tmp/notes.md --verify-tag diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b3d41..700abe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [2.0.1](https://github.com/FlatIO/api-client-python/compare/2.0.0...2.0.1) (2026-09-10) + +### Bug Fixes + +* **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. + ## [1.1.3](https://github.com/FlatIO/api-client-python/compare/v1.1.2...v1.1.3) (2024-03-08) diff --git a/README.md b/README.md index 1f73e49..a079da4 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,12 @@ except FlatNotFoundError: ### Asynchronous use -```python\nfrom flat_api import AsyncFlatClient +```python +from flat_api import AsyncFlatClient client = AsyncFlatClient(access_token="YOUR_TOKEN") -# every operation is awaitable\n``` +# every operation is awaitable +``` ## Supported versions diff --git a/VERSION b/VERSION index 227cea2..38f77a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 +2.0.1