From 5992c06d672f25cd4c9b3bb43df6ebb8478643ce Mon Sep 17 00:00:00 2001 From: erio Date: Tue, 3 Mar 2026 08:17:59 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=90=8C=E6=AD=A5=E8=8B=B1=E6=96=87=20?= =?UTF-8?q?README=EF=BC=8CZPay=20=E9=93=BE=E6=8E=A5=E6=98=8E=E6=96=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=B7=BB=E5=8A=A0=20release=20workf?= =?UTF-8?q?low?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ README.en.md | 19 ++++++++++++--- README.md | 12 ++++++---- 3 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..05309a1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + name: Create Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate changelog + id: changelog + run: | + # Get previous tag + PREV_TAG=$(git tag --sort=-v:refname | sed -n '2p') + if [ -z "$PREV_TAG" ]; then + COMMITS=$(git log --pretty=format:"- %s (%h)" HEAD) + else + COMMITS=$(git log --pretty=format:"- %s (%h)" "${PREV_TAG}..HEAD") + fi + { + echo 'body<> "$GITHUB_OUTPUT" + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + body: ${{ steps.changelog.outputs.body }} + generate_release_notes: false diff --git a/README.en.md b/README.en.md index c54b1d4..361a78e 100644 --- a/README.en.md +++ b/README.en.md @@ -116,6 +116,17 @@ ENABLED_PAYMENT_TYPES=alipay,wxpay #### EasyPay (Alipay / WeChat Pay) +Any payment provider compatible with the **EasyPay protocol** can be used, such as ZPay (`https://z-pay.cn/?uid=23808`) (this link contains the author's referral code — feel free to remove it). + +
+ZPay Registration QR Code + +![ZPay Preview](./docs/zpay-preview.png) + +
+ +> **Disclaimer**: Please evaluate the security, reliability, and compliance of any third-party payment provider on your own. This project does not endorse or guarantee any specific provider. + | Variable | Description | |----------|-------------| | `EASY_PAY_PID` | EasyPay merchant ID | @@ -256,13 +267,15 @@ docker compose exec app npx prisma migrate deploy Configure the recharge URL in the Sub2API admin panel: ``` -https://pay.example.com/pay?user_id={USER_ID}&token={TOKEN}&theme={THEME} +https://pay.example.com/pay ``` +Sub2API **v0.1.88** and above will automatically append the following parameters — no manual query string needed: + | Parameter | Description | |-----------|-------------| -| `user_id` | Sub2API user ID (required) | -| `token` | User login token (optional — required to view order history) | +| `user_id` | Sub2API user ID | +| `token` | User login token (required to view order history) | | `theme` | `light` (default) or `dark` | | `ui_mode` | `standalone` (default) or `embedded` (for iframe) | diff --git a/README.md b/README.md index 4b54c8d..696a433 100644 --- a/README.md +++ b/README.md @@ -116,10 +116,10 @@ ENABLED_PAYMENT_TYPES=alipay,wxpay #### EasyPay(支付宝 / 微信支付) -支付提供商只需兼容**易支付(EasyPay)协议**即可接入,例如 [ZPay](https://z-pay.cn/?uid=23808) 等平台(链接含本项目作者的邀请码,介意可去掉)。 +支付提供商只需兼容**易支付(EasyPay)协议**即可接入,例如 ZPay(`https://z-pay.cn/?uid=23808`)等平台(链接含本项目作者的邀请码,介意可去掉)。
-ZPay 平台预览 +ZPay 申请二维码 ![ZPay 预览](./docs/zpay-preview.png) @@ -267,13 +267,15 @@ docker compose exec app npx prisma migrate deploy 在 Sub2API 管理后台将充值链接配置为: ``` -https://pay.example.com/pay?user_id={USER_ID}&token={TOKEN}&theme={THEME} +https://pay.example.com/pay ``` +Sub2API **v0.1.88** 及以上版本会自动拼接以下参数,无需手动添加: + | 参数 | 说明 | |------|------| -| `user_id` | Sub2API 用户 ID(必填) | -| `token` | 用户登录 Token(可选,有 token 才能查看订单历史) | +| `user_id` | Sub2API 用户 ID | +| `token` | 用户登录 Token(有 token 才能查看订单历史) | | `theme` | `light`(默认)或 `dark` | | `ui_mode` | `standalone`(默认)或 `embedded`(iframe 嵌入) |