refactor(daemon): 调整DaemonSystemInfo和DaemonStatus类结构 #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Python Package and Upload as Artifact | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'pyproject.toml' | |
| - 'mcsmapi/**' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Check if it's a push event | |
| if: github.event_name == 'push' | |
| run: echo "Push event detected, proceeding to upload artifact..." | |
| - name: Upload .tar.gz as artifact | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mcsmapi.tar.gz | |
| path: dist/*.tar.gz | |
| - name: Upload .whl as artifact | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mcsmapi.whl | |
| path: dist/*.whl |