Skip to content

Commit 1cceeda

Browse files
committed
build: 通过 Trusted Publishing 发布 0.0.1.dev1 到 PyPI
首个公开版本走预发布,先验证发布链路与包元数据,稳定版另发。 发布授权用 PyPI Trusted Publishing 而非 API token,仓库里不落任何 长期凭证;打 v* tag 或手动触发即可发版。
1 parent 692d2d0 commit 1cceeda

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
# 打 v* tag 或手动触发时构建并发布到 PyPI。
4+
# 通过 PyPI Trusted Publishing 授权,仓库里不保存任何长期凭证。
5+
on:
6+
push:
7+
tags:
8+
- "v*"
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
id-token: write # Trusted Publishing 换取短期令牌所必需
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.10"
23+
24+
- name: Build sdist and wheel
25+
run: |
26+
python -m pip install --upgrade build twine
27+
python -m build
28+
twine check dist/*
29+
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@v1.14.2

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "qca"
3-
version = "0.1.0"
3+
version = "0.0.1.dev1"
44
description = "Typed synchronous and asynchronous clients for Qoder Cloud Agents"
55
authors = [{name = "Qoder"}]
66
license = "MIT"

0 commit comments

Comments
 (0)