Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the post-upload release step retryable

When the PyPI upload succeeds but this new GitHub release step fails—for example because of a transient GitHub API error—rerunning the failed job executes the PyPI action again before reaching this step. PyPI rejects the already-published files, as the workflow itself notes above the upload, so the rerun cannot create the missing release and the tag remains bare; put release creation in a separate dependent job or otherwise make the upload path idempotent.

Useful? React with 👍 / 👎.

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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the runtime version synchronized with VERSION

Publishing this tree as 2.0.1 still installs flat_api/__init__.py with __version__ = "2.0.0" at lines 13 and 65; flat_api.api_client also derives its user-agent version from that value. Consequently every 2.0.1 installation reports itself as 2.0.0 despite the wheel metadata and tag saying 2.0.1, so the runtime version sources must be updated alongside VERSION.

Useful? React with 👍 / 👎.

Loading