Skip to content

Commit a4f98d4

Browse files
author
Anycodes
committed
feat: add bilingual docs and improve CI
1 parent 75f0634 commit a4f98d4

File tree

8 files changed

+1087
-87
lines changed

8 files changed

+1087
-87
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@ name: Publish to PyPI
33
on:
44
push:
55
tags:
6-
- 'v*' # 当推送 v* 标签时触发(如 v1.0.0)
7-
workflow_dispatch: # 允许手动触发
6+
- 'v*'
7+
workflow_dispatch:
88

99
jobs:
10-
build-and-publish:
10+
publish:
11+
name: Build and publish to PyPI
1112
runs-on: ubuntu-latest
1213

1314
steps:
1415
- name: Checkout code
1516
uses: actions/checkout@v4
1617

1718
- name: Set up Python
18-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v5
1920
with:
20-
python-version: '3.10'
21+
python-version: '3.11'
2122

22-
- name: Install dependencies
23+
- name: Install build dependencies
2324
run: |
2425
python -m pip install --upgrade pip
2526
pip install build twine
@@ -30,6 +31,9 @@ jobs:
3031
- name: Check package
3132
run: twine check dist/*
3233

34+
- name: List distribution files
35+
run: ls -lh dist/
36+
3337
- name: Publish to PyPI
3438
env:
3539
TWINE_USERNAME: __token__
@@ -42,5 +46,15 @@ jobs:
4246
with:
4347
files: dist/*
4448
generate_release_notes: true
49+
body: |
50+
## Installation
51+
52+
```bash
53+
pip install --upgrade serverless-devs
54+
```
55+
56+
## What's Changed
57+
58+
See the full changelog at [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md)
4559
env:
4660
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ on:
99

1010
jobs:
1111
test:
12+
name: Test on ${{ matrix.os }} - Python ${{ matrix.python-version }}
1213
runs-on: ${{ matrix.os }}
1314
strategy:
15+
fail-fast: false
1416
matrix:
1517
os: [ubuntu-latest, macos-latest, windows-latest]
1618
python-version: ['3.10', '3.11', '3.12']
@@ -20,7 +22,7 @@ jobs:
2022
uses: actions/checkout@v4
2123

2224
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2426
with:
2527
python-version: ${{ matrix.python-version }}
2628

@@ -29,16 +31,45 @@ jobs:
2931
python -m pip install --upgrade pip
3032
pip install -e .
3133
32-
- name: Test import
34+
- name: Test Python import
3335
run: |
34-
python -c "import serverless_devs; print(serverless_devs.__version__)"
36+
python -c "import serverless_devs; print('Package version:', serverless_devs.__version__)"
3537
36-
- name: Test s command exists
38+
- name: Test s-install command availability
39+
shell: bash
40+
run: |
41+
if command -v s-install &> /dev/null; then
42+
echo "✓ s-install command found"
43+
else
44+
echo "✗ s-install command not found"
45+
exit 1
46+
fi
47+
48+
- name: Install Serverless Devs
49+
shell: bash
50+
run: |
51+
echo "Installing Serverless Devs..."
52+
s-install
53+
continue-on-error: true # 允许在 CI 环境中失败
54+
55+
- name: Check s command (if installed)
3756
shell: bash
3857
run: |
3958
if command -v s &> /dev/null; then
4059
echo "✓ s command found"
41-
s --version || true
60+
s --version
61+
else
62+
echo "ℹ s command not installed (may fail in CI environment)"
63+
fi
64+
continue-on-error: true
65+
66+
- name: Test npm availability (for debugging)
67+
shell: bash
68+
run: |
69+
if command -v npm &> /dev/null; then
70+
echo "✓ npm is available"
71+
npm --version
4272
else
43-
echo "✗ s command not found (expected for automated test)"
73+
echo "ℹ npm is not available"
4474
fi
75+
continue-on-error: true

CHANGELOG.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,44 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [1.0.2] - 2024-01-XX
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.3] - 2025-11-11
9+
10+
### Added
11+
- Bilingual documentation (English + Chinese)
12+
- Real Serverless Devs installation test in CI
13+
- Better badge URLs in README
14+
15+
### Changed
16+
- CI now tests on Python 3.10, 3.11, 3.12
17+
- Package still supports Python 3.7+
18+
- Improved installation error messages
19+
20+
### Fixed
21+
- Fixed README badge display issues
22+
- Fixed CI test for s command
23+
24+
## [1.0.2] - 2025-11-11
625

726
### Added
8-
- GitHub Actions 自动发布到 PyPI
9-
- 自动安装最新版 Serverless Devs(不再写死版本)
10-
- 支持国内镜像加速
27+
- GitHub Actions auto-publish to PyPI
28+
- Auto-install latest Serverless Devs (no hardcoded version)
29+
- Domestic mirror acceleration support
1130

1231
### Changed
13-
- 从下载二进制方式改为使用官方安装脚本
14-
- 改进错误提示和帮助信息
32+
- Changed from binary download to official script installation
33+
- Improved error messages and help information
1534

16-
## [1.0.1] - 2024-01-XX
35+
## [1.0.1] - 2025-11-11
1736

1837
### Fixed
19-
- 修复 Windows 下安装问题
38+
- Fixed Windows installation issues
2039

21-
## [1.0.0] - 2024-01-XX
40+
## [1.0.0] - 2025-11-11
2241

2342
### Added
24-
- 初始版本
25-
- 支持 WindowsLinuxmacOS
26-
- 通过 pip 安装 Serverless Devs
43+
- Initial release
44+
- Support for Windows, Linux, macOS
45+
- Install Serverless Devs via pip

0 commit comments

Comments
 (0)