Skip to content

Commit 571574a

Browse files
ci: create GitHub Release on publish
After a successful PyPI upload, create the matching GitHub Release with auto-generated notes and the built sdist/wheel attached. Grant the publish job contents:write for that. Add the GitHub Release badge to README. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 3bc92ce commit 571574a

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ jobs:
5151
name: dist
5252
path: dist/
5353

54-
# Upload the built artifacts to PyPI via trusted publishing.
55-
# Only runs on an actual version tag -- workflow_dispatch runs stop at
56-
# the build/test stage so you can dry-run the release without shipping it.
54+
# Upload the built artifacts to PyPI via trusted publishing, then create
55+
# the matching GitHub Release with auto-generated notes and the same
56+
# sdist/wheel attached. Only runs on an actual version tag --
57+
# workflow_dispatch runs stop at the build/test stage so you can dry-run
58+
# the release without shipping it.
5759
publish:
5860
needs: build
5961
if: startsWith(github.ref, 'refs/tags/')
@@ -65,6 +67,8 @@ jobs:
6567
# Required for PyPI's trusted publishing (OIDC) -- no API token/secret needed.
6668
# Configure this repo as a trusted publisher at https://pypi.org/manage/project/captcha-solver-api/settings/publishing/
6769
id-token: write
70+
# Required to create the GitHub Release.
71+
contents: write
6872
steps:
6973
- name: Download build artifacts
7074
uses: actions/download-artifact@v4
@@ -74,3 +78,9 @@ jobs:
7478

7579
- name: Publish to PyPI
7680
uses: pypa/gh-action-pypi-publish@release/v1
81+
82+
- name: Create GitHub Release
83+
uses: softprops/action-gh-release@v2
84+
with:
85+
generate_release_notes: true
86+
files: dist/*

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/captcha-solver-api/python-sdk/blob/main/LICENSE.md)
1111
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
1212
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
13+
[![GitHub Release](https://img.shields.io/github/v/release/captcha-solver-api/python-sdk)](https://github.com/captcha-solver-api/python-sdk/releases)
1314
[![JavaScript SDK](https://img.shields.io/badge/also_available-JavaScript_SDK-f7df1e?logo=javascript&logoColor=black)](https://github.com/captcha-solver-api/javascript-sdk)
1415

1516
Official Python SDK for the Captcha Solver API. Solve reCAPTCHA v2/v3, Cloudflare Turnstile, GeeTest, Yandex SmartCaptcha, Tencent, and image/click captchas with a single method call -- sync or async.

0 commit comments

Comments
 (0)