Skip to content

Commit 6672063

Browse files
author
Anycodes
committed
chore: bump version to 1.0.2
1 parent bfcf279 commit 6672063

File tree

12 files changed

+843
-0
lines changed

12 files changed

+843
-0
lines changed

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # 当推送 v* 标签时触发(如 v1.0.0)
7+
workflow_dispatch: # 允许手动触发
8+
9+
jobs:
10+
build-and-publish:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build twine
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Check package
31+
run: twine check dist/*
32+
33+
- name: Publish to PyPI
34+
env:
35+
TWINE_USERNAME: __token__
36+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
37+
run: twine upload dist/*
38+
39+
- name: Create GitHub Release
40+
uses: softprops/action-gh-release@v1
41+
if: startsWith(github.ref, 'refs/tags/')
42+
with:
43+
files: dist/*
44+
generate_release_notes: true
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test Installation
2+
3+
on:
4+
push:
5+
branches: [ main, master, dev ]
6+
pull_request:
7+
branches: [ main, master, dev ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install package
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e .
31+
32+
- name: Test import
33+
run: |
34+
python -c "import serverless_devs; print(serverless_devs.__version__)"
35+
36+
- name: Test s command exists
37+
shell: bash
38+
run: |
39+
if command -v s &> /dev/null; then
40+
echo "✓ s command found"
41+
s --version || true
42+
else
43+
echo "✗ s command not found (expected for automated test)"
44+
fi

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
wheels/
20+
*.egg-info/
21+
.installed.cfg
22+
*.egg
23+
24+
# Virtual environments
25+
venv/
26+
env/
27+
ENV/
28+
29+
# IDE
30+
.vscode/
31+
.idea/
32+
*.swp
33+
*.swo
34+
35+
# OS
36+
.DS_Store
37+
Thumbs.db
38+
39+
# Test
40+
test_env/
41+
.pytest_cache/

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [1.0.2] - 2024-01-XX
6+
7+
### Added
8+
- GitHub Actions 自动发布到 PyPI
9+
- 自动安装最新版 Serverless Devs(不再写死版本)
10+
- 支持国内镜像加速
11+
12+
### Changed
13+
- 从下载二进制方式改为使用官方安装脚本
14+
- 改进错误提示和帮助信息
15+
16+
## [1.0.1] - 2024-01-XX
17+
18+
### Fixed
19+
- 修复 Windows 下安装问题
20+
21+
## [1.0.0] - 2024-01-XX
22+
23+
### Added
24+
- 初始版本
25+
- 支持 Windows、Linux、macOS
26+
- 通过 pip 安装 Serverless Devs

0 commit comments

Comments
 (0)