8 Commits

Author SHA1 Message Date
Xuwznln
824b99635e Bump version: 0.0.6 → 0.1.0 2025-09-05 01:28:19 +08:00
Xuwznln
9d52781134 Bump version: 0.0.5 → 0.0.6 2025-09-05 01:23:06 +08:00
Xuwznln
89169ca7be 添加 PyPI 下载量徽章并格式化文档 2025-09-05 01:22:52 +08:00
Xuwznln
9d6d21de62 Bump version: 0.0.4 → 0.0.5 2025-09-03 13:09:22 +08:00
Xuwznln
502d4c4c04 Update publish.yml 2025-09-03 13:09:03 +08:00
Xuwznln
02f3216456 Update publish.yml 2025-09-03 13:04:30 +08:00
Xuwznln
a871c11df8 Bump version: 0.0.3 → 0.0.4 2025-09-03 12:59:30 +08:00
Xuwznln
7d1bc307ee Update publish.yml 2025-09-03 12:59:22 +08:00
4 changed files with 54 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.3
current_version = 0.1.0
commit = True
tag = True
tag_name = v{new_version}

View File

@@ -10,7 +10,7 @@ name: Upload PyPI package
on:
release:
types: [published]
types: [published, edited]
workflow_dispatch:
inputs:
test_pypi:
@@ -167,15 +167,33 @@ jobs:
python -m pip install build twine
- name: Verify version consistency
if: github.event_name == 'release'
if: github.event_name == 'release' && (github.event.action == 'published' || (github.event.action == 'edited' && !github.event.release.prerelease))
run: |
VERSION=$(python -c "import msgcenterpy; print(msgcenterpy.__version__)" 2>/dev/null || echo "unknown")
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
# Install package first
pip install -e .
# Get package version (fail fast if not available)
VERSION=$(python -c "import msgcenterpy; print(msgcenterpy.__version__)")
# Handle both v0.0.3 and 0.0.3 tag formats
RAW_TAG="${GITHUB_REF#refs/tags/}"
if [[ "$RAW_TAG" == v* ]]; then
TAG_VERSION="${RAW_TAG#v}"
else
TAG_VERSION="$RAW_TAG"
fi
echo "Package version: $VERSION"
echo "Tag version: $TAG_VERSION"
if [ "$VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch: package=$VERSION, tag=$TAG_VERSION"
echo "Version mismatch: package=$VERSION, tag=$TAG_VERSION"
echo "Please ensure the package version matches the git tag"
exit 1
fi
echo "✅ Version verification passed: $VERSION"
- name: Build release distributions
run: |
python -m build
@@ -195,7 +213,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- release-build
if: github.event_name == 'release' && !github.event.release.prerelease && github.event.inputs.test_pypi != 'true'
if: github.event_name == 'release' && !github.event.release.prerelease && github.event.inputs.test_pypi != 'true' && (github.event.action == 'published' || github.event.action == 'edited')
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
@@ -218,7 +236,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- release-build
if: github.event.inputs.test_pypi == 'true' || (github.event_name == 'release' && github.event.release.prerelease)
if: github.event.inputs.test_pypi == 'true' || (github.event_name == 'release' && github.event.release.prerelease && (github.event.action == 'published' || github.event.action == 'edited'))
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
@@ -242,7 +260,9 @@ jobs:
name: Add assets to GitHub release
runs-on: ubuntu-latest
needs: release-build
if: github.event_name == 'release'
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'edited')
permissions:
contents: write # Need write access to upload release assets
steps:
- name: Retrieve release distributions

View File

@@ -4,6 +4,7 @@
[![PyPI version](https://badge.fury.io/py/msgcenterpy.svg)](https://badge.fury.io/py/msgcenterpy)
[![Python versions](https://img.shields.io/pypi/pyversions/msgcenterpy.svg)](https://pypi.org/project/msgcenterpy/)
[![PyPI downloads](https://img.shields.io/pypi/dm/msgcenterpy.svg)](https://pypi.org/project/msgcenterpy/)
[![Build Status](https://github.com/ZGCA-Forge/MsgCenterPy/actions/workflows/ci.yml/badge.svg)](https://github.com/ZGCA-Forge/MsgCenterPy/actions)
[![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-brightgreen)](https://zgca-forge.github.io/MsgCenterPy/)
@@ -59,7 +60,25 @@ Please visit: [https://zgca-forge.github.io/MsgCenterPy/](https://zgca-forge.git
## Development
### Development Environment Setup
### Quick Development Setup
For **Linux/macOS**:
```bash
git clone https://github.com/ZGCA-Forge/MsgCenterPy.git
cd MsgCenterPy
./scripts/setup-dev.sh
```
For **Windows**:
```powershell
git clone https://github.com/ZGCA-Forge/MsgCenterPy.git
cd MsgCenterPy
.\scripts\setup-dev.ps1
```
### Manual Development Setup
```bash
git clone https://github.com/ZGCA-Forge/MsgCenterPy.git
@@ -70,6 +89,10 @@ pre-commit install
For API documentation, please refer to Quick Start
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=ZGCA-Forge/MsgCenterPy&type=Date)](https://star-history.com/#ZGCA-Forge/MsgCenterPy&Date)
## License
This project is licensed under Apache-2.0 License - see the [LICENSE](LICENSE) file for details.

View File

@@ -5,7 +5,7 @@ A multi-format message conversion system supporting seamless conversion
between ROS2, Pydantic, Dataclass, JSON, Dict, YAML and JSON Schema.
"""
__version__ = "0.0.3"
__version__ = "0.1.0"
__license__ = "Apache-2.0"
from msgcenterpy.core.envelope import MessageEnvelope, create_envelope